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));
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));