Re: Newbie SQL Left Outer Join

shall_at_uaex.edu
Date: 02/21/05


Date: 21 Feb 2005 05:29:53 -0800

THat did it.
Works like a charm!!!

David Portas wrote:
> Possibly this is what you want:
>
> SELECT R.name, M.item
> FROM MyReference R
> LEFT OUTER JOIN MyList M
> ON R.idkey=M.idkey
> AND M.fiscalyear=2005 And M.item=5
> WHERE R.fiscalyear=2005
>
> If you reference the unpreserved table (MyList) in the WHERE clause
as
> you did then you effectively turn the OUTER join into an INNER join.
>
> --
> David Portas
> SQL Server MVP
> --