Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: outer joins with composite keys in oracle impossible?
>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