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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL and outer joins

Re: SQL and outer joins

From: fumi <fumi_at_tpts5.seed.net.tw>
Date: 8 Aug 1999 15:35:02 GMT
Message-ID: <7ok836$8ot$3@news.seed.net.tw>

Paul Ferrie <daspaf_at_julian.uwo.ca> wrote in message news:378A55C0.ACFB3177_at_julian.uwo.ca...
> 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'
This line should be revised to

                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 Sun Aug 08 1999 - 10:35:02 CDT

Original text of this message

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