I'm new to DB2. I've created a sample procedure:
connect to SAMPLE
@
DROP PROCEDURE SP_BI_DEMO ()
@
CREATE PROCEDURE SP_BI_DEMO()
DYNAMIC RESULT SETS 0
BEGIN
CALL SYSPROC.ADMIN_CMD ('LOAD FROM (SELECT concat("0000" , FLD1) , FLD2 FROM T_SOURCE) OF CURSOR REPLACE INTO T_TARGET');
END
@
CONNECT RESET
@
--------------------------------
When executing the procedure, the system returns
SQL0206N "0000" is not valid in the context where it is used. SQLSTATE=42703".
Can anyone tell me what went wrong? Thanks.