Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2013
    Posts
    1

    Unanswered: Stored proc returning fixed value

    Hi,
    I am a newbie to databases and struggling to write a DB2 stored procedure which returns a constant string.

    CREATE OR REPLACE PROCEDURE GET_NEXTVAL (OUT nextValue varchar(250))
    RESULT SETS 1
    LANGUAGE SQL
    BEGIN
    nextvalue = "1000,2000";
    END

    I understand that the syntax is wrong. Please help!
    Also, if i pick any ready code from the Internet, the DB2 command centre always complains of special characters in the code.

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    or :
    - read the manuals at
    CREATE PROCEDURE (SQL)
    - or have a look at samples directory where db2 has been installed for all kind of samples for different needs....
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •