Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Conditional Join
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')
Your Oracle join syntax example should be:
Select ...
From CustMast a, CustAddrMast b
where Custmast.CustomerId = custaddrmast.CustomerId(+) and
Customeraddrmast.ActiveYN(+) = 'Y';
NitsR wrote:
> Hi John
>
> thanks for the reply
> I am using 10g
>
> I changed my query as per your suggestion as follows
>
> SELECT a.customercode, a.custname, b.custaddr
> FROM mascustomer a RIGHT OUTER JOIN mascustaddr b
> ON (a.customerid = b.customerid)
> WHERE (b.activeyn = 'Y')
>
> Still the same result, only matching records are returned.
Received on Thu Nov 22 2007 - 03:22:59 CST
![]() |
![]() |