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 -> How do I construct multiple outer joins?

How do I construct multiple outer joins?

From: Randy Harris <randy.harris_at_nospam.net>
Date: Wed, 26 Feb 2003 06:20:52 GMT
Message-ID: <81Z6a.1427$se1.1043832@newssvr28.news.prodigy.com>


I need help with a SQL...

I have 3 tables, I've tried:

SELECT Table1.Field1, Table1.Field2, Table2.Field1, Table3.Field1 FROM Table1, Table2,Table3
WHERE Table1.Key1 = Table2.Key1

   AND Table2.Key2(+) = Table3.Key2
   AND Table3.Field1 = 'Criteria' ;

What I need is for it to return Table3.Field1 regardless of whether there is a matching record in Table2. It returns 0 records, I assume because there is no circumstance where "Table1.Key1 = Table2.Key1", since there is no matching record in Table2. Is there a way to write this SQL to do what I need?

--
Randy Harris
Received on Wed Feb 26 2003 - 00:20:52 CST

Original text of this message

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