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

Home -> Community -> Usenet -> c.d.o.server -> Re: outer joins with composite keys in oracle impossible?

Re: outer joins with composite keys in oracle impossible?

From: Jan Rosinowski <rosinowski_at_gmx.de>
Date: Fri, 29 Jan 1999 06:45:14 GMT
Message-ID: <36b08c45.2106769@bigXb>


>SQL> select *
> 2 from a,b
> 3 where a.c1=b.c1(+)
> 4 and a.c2=b.c2(+)
> 5 /
>
>Thats the correct answer -- what were you looking for?

shame on me. i hadn't realized that in my case i had to use

> 2 from a,(select distinct c1,c2 from b)

actually i was looking for an efficient way to create a view of "a" plus an indicator:

select a.*,nvl(b.c1-b.c1,1) as ismain
from a,b
where a.c1=b.c1(+)

    and a.c2=b.c2(+)

ciao, jan Received on Fri Jan 29 1999 - 00:45:14 CST

Original text of this message

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