Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 03 Feb 2004 @ 19:51:10 GMT


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


Subj:   Re: UPDATE and OUTER JOIN
 
From:   Babu, Mahesh

  Can we incorporate outer join into an Update Statement  



Do like this

        UPDATE TABLE1
      FROM (SELECT  C.FIELD1,COALESCE(A.FIELD1,B.FIELD1)
            FROM TABLE1
            LEFT OUTER JOIN
            TABLE2
            ON 
            LEFT OUTER JOIN
            TABLE3
            ON ) D(FIELD1,FIELD2)
       SET FIELD1 = D.FIELD2
     WHERE TABLE1.FIELD1 = D.FIELD1

Thanks



     
  <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