|
Archives of the TeradataForumMessage Posted: Fri, 28 Feb 2014 @ 10:51:08 GMT
<-- 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.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||