I am a TD newcomer and still figuring out details.
I came across below piece of code that caught my attention.
REPLACE PROCEDURE ABC (IN dbname VARCHAR(30),IN spname VARCHAR(100), IN batchDt DATE )
DECLARE tProcDb VARCHAR(30) ;
DECLARE tProcNm VARCHAR(100);
DECLARE tmsg_id, hc1count INTEGER ;
DECLARE sqlmsg VARCHAR(1000);
DECLARE hHex CHAR(2);
DECLARE hAscii, hrepl CHAR(1);
SET tProcDb = dbname;
SET tProcNm = spname;
Are these tProcDb, tProcNm variables? Is this a way to declare and use variables?
I tried to do this in a separate window.
DECLARE url VARCHAR(1000);
DECLARE id VARCHAR(100);
SET url = 'http://www.ABC.com/CDE/00004537173DA4D4'
SET id = SUBSTRING (url, 5,20))
I got message: The query is invalid.
What am I missing in this picture?