Article View: pl.comp.bazy-danych
Article #195240Re: [MSSQL] Zagnieżdżony SELECT i NULL
From: geos
Date: Sat, 18 Feb 2017 07:54
Date: Sat, 18 Feb 2017 07:54
13 lines
1221 bytes
1221 bytes
On 18.02.2017 00:28, Adam wrote:
> select T_Kod, T_Nazwa,
> (select SUM(D_Ilosc) from #tmpDostawa where D_Kod = T_Kod)
> from #tmpTowar
coalesce:
select t_kod, t_nazwa,
(select coalesce(sum(d_ilosc),0) from #tmpdostawa where d_kod = t_kod)
from #tmpTowar
pozdrawiam,
geos
Technical Details
Message-ID:
<58a7fdba$0$15204$65785112@news.neostrada.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin3!goblin1!goblin.stu.neva.ru!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mailReferences:
<o880vb$r5l$1@usenet.news.interia.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin3!goblin1!goblin.stu.neva.ru!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!unt-spo-a-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail Subject: Re: [MSSQL] Zagnieżdżony SELECT i NULL Newsgroups: pl.comp.bazy-danych References: <o880vb$r5l$1@usenet.news.interia.pl> From: geos <geos@SPAMPRECZ.autograf.pl> Date: Sat, 18 Feb 2017 08:54:33 +0100 MIME-Version: 1.0 In-Reply-To: <o880vb$r5l$1@usenet.news.interia.pl> Lines: 13 Message-ID: <58a7fdba$0$15204$65785112@news.neostrada.pl> Organization: Telekomunikacja Polska NNTP-Posting-Host: 178235002189.warszawa.vectranet.pl X-Trace: 1487404474 unt-rea-a-02.news.neostrada.pl 15204 178.235.2.189:43395 X-Complaints-To: abuse@news.neostrada.pl Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit