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 -> Left outer join

Left outer join

From: Andy <andyrich_1_at_hotmail.com>
Date: 12 Nov 2003 08:25:39 -0800
Message-ID: <6a33f967.0311120825.296b5db5@posting.google.com>


I realise that this has probably been done to death but I am having trouble with my outer join statement. It doesn't return more rows that that of an equal join.

Here's a simple test I set up:

Table AR1
select * from ar1

ACCOUNT                    
100                                                                   
         999

Table AR2
select * from ar2;

ACCOUNT ATTVALUE ATT

100        A COSTC    C1
999        A PROJECT  40 

Outer Join Statement
select *
from ar1 ac, ar2 cc
where ac.account = cc.account(+)
and cc.att= 'C1';

ACCOUNT ACCOUNT ATTVALUE ATT
100 100 A COSTC C1 My understanding is that it should return all the rows from the first table in this example ar1 and null values where there aren't a matching. so some thing like this:

ACCOUNT ACCOUNT ATTVALUE ATT

100        100        A COSTC    C1 
999        NULL       NULL       NULL


Any help greatly appreciated.

Thanks
Andy Received on Wed Nov 12 2003 - 10:25:39 CST

Original text of this message

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