Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Store Procedure Return Codes & Failed Query Txt - response (1) by TD@NIAR

$
0
0

Hi Anand
One way is to declare a a variable of length around varchar(10000) and assign your query to it. Later create a table which has column names as your procedure name, step name, and the sql string (varchar(600)). If you feel your query is longer than 600 characters then take a substring and insert in steps.
DECLARE QR VARCHAR(10000);
SET QR = 'INSERT INTO.....'
INSERT INTO DB.TBL('MYPROC','2NDSTEP',SUBSTR(QR,1,600));
INSERT INTO DB.TBL('MYPROC','2NDSTEP',SUBSTR(QR,601,1200));
 


Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>