Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> SQL and outer joins
Can anyone tell me how to accomplish this....
I have 2 tables DONOR_TBL and NAME_TBL.
I have both Active and Inactive donors. There are multiple names for donors based on a Name Type Code. I need a list of all Active donors where the Name Type is 'GR'. The problem is, I still want to see all the Active donors even if they don't have a Name Type of 'GR'.
So, if I were to do the following:
SELECT A.DONOR_NUMBER, B.DONOR_NAME
FROM DONOR_TBL A, NAME_TBL B
WHERE A.DONOR_NUMBER = B.DONOR_NUMBER(+) AND
A.DONOR_STATUS = 'A' AND B.NAME_TYPE = 'GR'
the outer join is negated by the other WHERE criteria. So, do I have to do a UNION or is there another way around this?
Thanks in advance.
Paul.
Received on Mon Jul 12 1999 - 15:53:20 CDT
![]() |
![]() |