Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 27 Aug 2004 @ 13:31:43 GMT


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


Subj:   Re: Result count variable in macro
 
From:   Geoffrey Rommel

  Is it possible to get the query result count (from select, update, or Delete) launched in a macro , like the Oracle SQL%rowcount ?  


Not directly, but if you are calling the macro from a program, there should be a way to find the rowcount. For instance, if you are using C with embedded SQL, you would look at SQLCA.sqlerrd[2]. Similar variables exist in DBD::Teradata, Java, and BTEQ.


  The same question too , in a procedure.  


Yes. This is easy:

     declare rowcount  integer;
     ...
     set rowcount = activity_count;

Under V2R4.1, activity_count is an integer, so it could overflow if you are modifying more than 2^31 rows.



     
  <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