Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #1900

Re: left join not quite working

From Gene Wirchenko <genew@telus.net>
Newsgroups comp.databases.ms-sqlserver
Subject Re: left join not quite working
Date 2015-02-27 10:23 -0800
Organization A noiseless patient Spider
Message-ID <qed1falvg0m421p1vh3nl5g643uprem639@4ax.com> (permalink)
References <c0762c65-7f65-474d-813a-1d399447b7a2@googlegroups.com> <7b4594f3-98a9-45fe-a455-57098e72204b@googlegroups.com>

Show all headers | View raw


On Thu, 26 Feb 2015 18:03:13 -0800 (PST), "M.G."
<michael@gurfinkel.us> wrote:

>Solved - I should have check for the date within ON clause, and not in the WHERE
>correct version looks like this :
>
>select ...
>left join	@SCHEDULED S	on E.EMPL_ID=S.EMPL_ID
>     and S.WORK_DATE = '20150107';

     I was wondering what I was missing.

     You also do not need the is null check.

[snip]

Sincerely,

Gene Wirchenko

Back to comp.databases.ms-sqlserver | Previous | NextPrevious in thread | Find similar


Thread

left join not quite working "M.G." <michael@gurfinkel.us> - 2015-02-26 15:51 -0800
  Re: left join not quite working "M.G." <michael@gurfinkel.us> - 2015-02-26 18:03 -0800
    Re: left join not quite working bradbury9 <ray.bradbury9@gmail.com> - 2015-02-27 00:16 -0800
    Re: left join not quite working Gene Wirchenko <genew@telus.net> - 2015-02-27 10:23 -0800

csiph-web