how to pass table name in DB2 Procedure. i passed as IN variable. like this
But it throws an error as
Category Timestamp Duration Message Line Position
Error 11/2/2010 11:50:03 AM 0:00:00.000 DB2 Database Error: ERROR [42601] [IBM][DB2/AIX64] SQL0104N An unexpected token "DECLARE ACCNT_WID_CURSO R FOR SELEC" was found following "SQLSTATE '02000'; ". Expected tokens may include: "<psm_set_token >". LINE NUMBER=11. SQLSTATE=42601
108 0
Code:
CREATE PROCEDURE PROC1 (IN TNAME CHAR (12)) BEGIN UPDATE TNAME P
Category Timestamp Duration Message Line Position
Error 11/2/2010 11:50:03 AM 0:00:00.000 DB2 Database Error: ERROR [42601] [IBM][DB2/AIX64] SQL0104N An unexpected token "DECLARE ACCNT_WID_CURSO R FOR SELEC" was found following "SQLSTATE '02000'; ". Expected tokens may include: "<psm_set_token >". LINE NUMBER=11. SQLSTATE=42601
108 0