How to pass table name in DB2 Procedure?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Schow

    How to pass table name in DB2 Procedure?

    how to pass table name in DB2 Procedure. i passed as IN variable. like this

    Code:
    CREATE PROCEDURE PROC1 (IN TNAME CHAR (12))
       BEGIN
          UPDATE TNAME P
    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
    Last edited by NeoPa; Nov 3 '10, 01:57 AM. Reason: Please use the [code] tags provided.
Working...