Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Posts
    20

    Unanswered: db2 v8FP4 Win2kProf: Calling stored procedure from select query

    Hi All,

    Yet another problem. I am running db2 version 8 fix pack 4 on win2k prof machine. I am porting Oracle database to db2. I had to convert several functions to db2 procedures because of the limitations with cursors, error handling, modifies sql data etc. Now I have to call a stored procedure in a query like:

    select fld1, procedure1(param1, param2, outParam3) as/into fld2 from tableName
    How can I do this?


    Regards,
    Deepak Ajmera
    Last edited by deepaka; 02-05-04 at 08:29.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Deepak,
    You cannot. It is not allowed.

    Andy

  3. #3
    Join Date
    Jan 2004
    Location
    Tallahassee, FL, USA
    Posts
    96
    Originally posted by ARWinner
    Deepak,
    You cannot. It is not allowed.

    Andy
    you can not cal procedure from SELECT statement , function can be called

  4. #4
    Join Date
    Jun 2002
    Location
    UK
    Posts
    525
    Originally posted by ARWinner
    Deepak,
    You cannot. It is not allowed.

    Andy
    He could put the SQL in an SP and call the other SP from there to set his parameter. There should be a few example of this on this forum.

  5. #5
    Join Date
    Jan 2004
    Posts
    20
    Thank you for your replies...

    Regards
    Deepak Ajmera

Posting Permissions

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