Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 13 Dec 2013 @ 10:34:23 GMT


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


Subj:   Conditional Update with CASE
 
From:   Anomy Anom

<-- Anonymously Posted: Friday, December 13, 2013 05:20 -->

Hello All,

We have a few update statements that we have as a part of the transformation where we are updating

     update SUBSCR set isourceid = 60 where isourceid = 0 and source like '%||Newsletter %';

     update SUBSCR set sourceid = 65 where isourceid = 0 and (source like '%||CustomerService %'
     or source like 'BrandSite %');

Many similar statements;? And many such tables.

As you can see, this is just value that we are hardcoding based on source text value. In lieu of multiple update statements which are time consuming, can we possibly write updates with CASE? (I don't think this can be done ).

Is there an alternative to it? I have to UPDATE history data in TD as well as Oracle Source. Though we could do a insert into a temp table and switch, our DBA doesn't agree?


Regards



     
  <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: 27 Dec 2016