Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 01 Jun 2010 @ 09:33:47 GMT


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


Subj:   Re: Performance of a procedure using Cursor
 
From:   Dmitriy.Boyko

Hi!

Try this

     WHILE (SQLCODE = 0 and newvar < 1000)
     DO
     FETCH cur1 into   v_the_date , v_dim_loan, v_load_id,v_active  ;

     -- To Test , how much time it will take to update 1000 rows, I have put
     this  IF condition

     IF newvar < 1000 THEN

     UPDATE  WORKDATABASE.fct1
                SET     RECORD_LOAD_DTTM=current_timestamp(0)
                  WHERE   dim_loan = v_dim_loan
                  AND load_id = v_load_id
                  and the_date =v_the_date
                  and active =v_active;

     SET newvar = newvar + 1;

     END IF ;

Best regards,

Dmitriy Boyko



     
  <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