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
> --



Relevant Pages

  • Re: outer join question
    ... On Aug 17, 4:45 pm, "David Portas" ... A LEFT OUTER JOIN B ... And why the inventors of the syntax decided the LEFT/RIGHT ... Why anyone would ever want to write that backwards using RIGHT OUTER ...
    (comp.databases.oracle.server)
  • Re: Outer join
    ... On 18 Sep, 20:10, David Portas ... OVER (PARTITION BY e.customer_id) "STUFF" ... WHERE is evaluated AFTER the outer join so that WHERE condition would ... WHERE e.email_product_id = 'PPM' ...
    (comp.databases.oracle.server)
  • Re: Matching fileds between two tables
    ... It sounds like you'll want an outer join. ... David Portas ... SQL Server MVP ... The second problem is the part number in the second ...
    (microsoft.public.sqlserver.mseq)
  • Re: DTS import to update current rows
    ... outer join that you demonstrated. ... would you use a cursor or other way to look at each row? ... > target table is smaller and you don't hit the same rows you just ... > David Portas ...
    (microsoft.public.sqlserver.dts)