Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 28 Feb 2014 @ 10:51:08 GMT


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


Subj:   DBQL queryband column population for individual stored procedure DML statements
 
From:   Anomy Anom

<-- Anonymously Posted: Friday, February 28, 2014 05:44 -->

Hi all

I'm a stored procedure novice and have been experimenting with a simple SP today which I've managed to get working. The SP is defined with DYNAMIC RESULT SETS 1 and has a few simple steps:

     set queryband for transaction;
     delete a table;
     insert into a table;

if the insert above didn't insert any rows then insert again from a different source; select from the table; delete the table;

When I look at the DBC.DBQLOGTBL after running a successful CALL to the SP I can see multiple rows, 1 for the CALL, 1 for the SET QUERYBAND statement and 1 for each DML statement thereafter however the queryband column is not populated with the detail from the SET queryband statement for each of the subsequent DML steps.

I understand why this is happening (I guess) as I assume these are different transactions and I know I can't issue a SET QUERYBAND FOR SESSION within an SP (nor do I want to), so does anyone know of a way to set the queryband values for each of the DELETE, INSERT and SELECT statements within the stored procedure ?

Thanks in advance for any assistance.



     
  <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: 27 Dec 2016