Stored procedure in DB2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JayaramN
    New Member
    • Nov 2012
    • 4

    Stored procedure in DB2

    Hi ,
    I was new to Db2 .
    I was trying to create my first DB2 Stored procedure
    and I am getting the below error message

    Expected tokens may include: "JOIN <joined_table>" . SQLSTATE=42601

    SQL0104N An unexpected token "END-OF-STATEMENT" was found following "END". Expected tokens may include: "JOIN <joined_table > ".


    Code:
    create or replace procedure test(EMPNO  CHAR(10), OUT EMPNAME  VARCHAR(16))
    LANGUAGE SQL       
    BEGIN         
         DECLARE name1 CHAR(1000);     
        -- set name1='Testing';
        -- set EMPNAME = EMPNO ;
    END
    Can you please help me to resolve.
  • Anas Mosaad
    New Member
    • Jan 2013
    • 185

    #2
    The maximum char length is 254, please check the max lengths at the infocenter http://pic.dhe.ibm.com/infocenter/db...Fr0001029.html

    Varchar should work fine for your case.

    Comment

    Working...