Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 29 Apr 2009 @ 21:30:44 GMT


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


Subj:   Re: Update / case statement
 
From:   Saxena, Rakesh

No need to have tablename.columnname for the column that needs to be updated, just columname alone will do.

     update table_A
     set
     column1 = case when  table_A.column2=table_B.column2
                                             and  table_A.column2=table_C.column2
                                                 and table_C.column3=table_D.column3
                                                 then (case when  table_B.column4 = '1'
                                                                  and table_C.column4 = '2
                                                                      then  'Y'
                                                             else  'N'
                                             end)
                                      end

Regards,

Rakesh Saxena



     
  <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