Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 21 May 2004 @ 17:10:53 GMT


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


Subj:   Re: Operation ++
 
From:   ulrich arndt

Hi,

I played a bit with this today and I think the following is what you are looking for:

1.define a stored procedure for the insert into the log table

     within this procedure
     define an inout step_id as integer

     as in and output variable

after you inserted your log info into your log table you increment your step_id by 1 by

     set step_id = step_id + 1;

now declare the step_id variable in your stored procedure which you like to log by:

     declare set_id integer default 1;

the only thing you have to do now is to call your log stored procedure with the step_id variable.

After each call the variable is 1 higher as before the call - you don't have to do anything with this variable within the stored procedure with you like to log - quite nice :-)

Send me a mail if you have problems with this.


Ulrich



     
  <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