Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Conditional Join

Re: Conditional Join

From: Robert Klemme <shortcutter_at_googlemail.com>
Date: Sun, 25 Nov 2007 17:05:24 +0100
Message-ID: <5qtkq6F11933lU1@mid.individual.net>


On 22.11.2007 10:22, Peter wrote:
> I think your outer join logic was wrong.
> Your ANSI join syntax example should be:
>
> SELECT ...
> FROM mascustomer a RIGHT OUTER JOIN mascustaddr b
> ON (a.customerid = b.customerid) AND (b.activeyn = 'Y')

Shouldn't this be a LEFT outer join? From what I read in the thread mascustomer is the master table from which all records should be pulled.

SELECT ...
   FROM mascustomer a LEFT OUTER JOIN mascustaddr b

        ON a.customerid = b.customerid AND b.activeyn = 'Y'

Cheers

        robert Received on Sun Nov 25 2007 - 10:05:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US