Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sun, 05 Oct 2003 @ 15:46:04 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Outer Join
 
From:   Christian Schiefer

Hi,

both alternatives do the job:

Select A.ac1
       ,A.ac2
from  A

left  join B
on    A.ac1 = B.bc1

left  join C
on    A.ac1 = C.cc1
where B.bc2 > 10 or B.bc2 is null
And   C.cc2 = 11 or C.cc2 is null;

or

Select A.ac1
       ,A.ac2
from  A

left  join
        ( select *
        from B where
        B.bc2 > 10 ) B_sub
on    A.ac1 = B_sub.bc1

left  join
      ( select *
        from C
        where C.cc2 = 11 ) C_sub
on    A.ac1 = C_sub.cc1;


     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023