Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Outer join problem
"s. hunter" wrote:
>
> Sorry, Pierre, I don't think I explained myself very well!
>
> The results I want returned are all the descriptions in table B,
> together with their values from table A (the numerical column), but only
> if the seqid in A is equal to a given value, otherwise I want a null.
>
> So what you suggest would work in that case because it depends on a
> seqid being present in both cases (I think!)
>
Well, it sure is a strange query, but I guess I understand now I think you want
SELECT a.seqid, b.description, a.numerical_column
from a, b
where a.catid(+)=b.catid
and a.seqid(+)='12345'
order by b.description
/
works with the example somebody else posted
I.e.
SQL> l
1 SELECT e.sal, d.loc, e.hiredate
2 from emp e, dept d
3 where e.deptno(+)=d.deptno
4* and e.sal(+)='1500'
SQL> /
SAL LOC HIREDATE
---------- ------------- ---------
NEW YORK DALLAS 1500 CHICAGO 08-SEP-81 BOSTONReceived on Wed Feb 09 2000 - 17:54:49 CST
![]() |
![]() |