Home Page for the TeradataForum
 
 

 

Archives of the TeradataForum





Message Posted: Mon, 20 Mar 2006 @ 22:18:26 GMT





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




Subj:   Passing SQLSTATE in Stored Procedures back to BTEQ?
 
From:   Bense, Peter



I have a small dilemma that I'm encountering with coding a basic SP to collect statistics.

The proc should perform 3 steps:

1. An insert

2. A COLLECT STATISTICS statement

3. An update


I want the SP to return the SQLSTATE of the COLLECT STATISTICS step. I know SQLSTATE should hold this variable upon completion of that step, but how do I pass that back to BTEQ?

I am sure I can map it to a standard IN/OUT variable or something, but I don't think that will do what I want. What I want to happen is that the state of this event (if NZ) will also cause the INVOKING of the SP itself to return the same NZ value.


Any ideas?

-Peter





     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
 
  Top Home Join Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky 
Last Modified: 30 Jun 2008