If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > db2 v8FP4 Win2kProf: Calling stored procedure from select query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-05-04, 05:28
deepaka deepaka is offline
Registered User
 
Join Date: Jan 2004
Posts: 20
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 07:29.
Reply With Quote
  #2 (permalink)  
Old 02-05-04, 11:07
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Deepak,
You cannot. It is not allowed.

Andy
Reply With Quote
  #3 (permalink)  
Old 02-05-04, 11:56
famudba famudba is offline
Registered User
 
Join Date: Jan 2004
Location: Tallahassee, FL, USA
Posts: 96
Quote:
Originally posted by ARWinner
Deepak,
You cannot. It is not allowed.

Andy
you can not cal procedure from SELECT statement , function can be called
Reply With Quote
  #4 (permalink)  
Old 02-05-04, 11:58
Damian Ibbotson Damian Ibbotson is offline
Padawan
 
Join Date: Jun 2002
Location: UK
Posts: 525
Quote:
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.
Reply With Quote
  #5 (permalink)  
Old 02-06-04, 00:52
deepaka deepaka is offline
Registered User
 
Join Date: Jan 2004
Posts: 20
Thank you for your replies...

Regards
Deepak Ajmera
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On