Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 05 May 2005 @ 18:31:12 GMT


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


Subj:   Re: Logic in a Tpump DML
 
From:   hock lim

Brad,

Force the tpump to perform an update even if the new data record is older than the current record, the trick is using the timestamp column. For example, if the incoming record is older than the current record, use the current record instead.

     .DML LABEL MyInsert
     DO INSERT FOR MISSING UPDATE ROWS;
     update mydb.mytable set
     account_nm = case when update_ts <= :update_ts
          then  :in_acct_nm else acct_nm
     ......
     where
     account_id = :in_acct_id
     ;

insert part needs no changes...

Looks like your incoming data already has gateway timestamp imprinted (gateway timestamp ensures every record is sequentially processed) so this will work.


Hock



     
  <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