Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Conditional Join
Hello All
I have a Customer Master table and have a child table for multiple address of 1 customer. In the Address table have a column for ActiveYN which is 'Y' for only one record. I want to get a view with the ActiveYN = 'Y' address by joining these 2 tables. And also need a outer join so even if there is no address for the customer then it will still get the customer master record
I tried this
Select a.CustomerCode,a.CustomerName,b.CustAddress
From CustMast a, CustAddrMast b
where Custmast.CustomerId = custaddrmast.CustomerId(+) and
Customeraddrmast.ActiveYN = 'Y';
but this results only in the matching records.
Any help ?
Thanks.
Received on Wed Nov 21 2007 - 20:40:34 CST
![]() |
![]() |