dnivraramuk
Programmer
Hi,
I want to fetch a values from a dynamic SQL, but don't know what would be the syntax and way to do it..
I have the synamis SQL as :
SET V_SQL_STMT ='SELECT CHAR('|| V_ELEMENT_NAME ||
') FROM ODS.'||V_TABLE_NAME||' WHERE '|| V_JOIN_COLUMN1||' = ? ';
PREPARE s1 FROM V_SQL_STMT ;
EXECUTE s1 USING V_KEY1;
Here I want to fetch the output of my select statement into a variable in a store procedure.
I am using DB2 UDB 7.2.6. Help is highly appritiate.
Thanks,
Arvind
I want to fetch a values from a dynamic SQL, but don't know what would be the syntax and way to do it..
I have the synamis SQL as :
SET V_SQL_STMT ='SELECT CHAR('|| V_ELEMENT_NAME ||
') FROM ODS.'||V_TABLE_NAME||' WHERE '|| V_JOIN_COLUMN1||' = ? ';
PREPARE s1 FROM V_SQL_STMT ;
EXECUTE s1 USING V_KEY1;
Here I want to fetch the output of my select statement into a variable in a store procedure.
I am using DB2 UDB 7.2.6. Help is highly appritiate.
Thanks,
Arvind