Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Conditional Join
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
![]() |
![]() |