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 > how to insert a Result set returned from a procedure..?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-10-06, 00:25
Shefu Shefu is offline
Registered User
 
Join Date: Apr 2005
Posts: 127
Talking how to insert a Result set returned from a procedure..?

Hi,

I need a clarification regarding the result set returned by a stored procedure.

Assume that i ve stored procedures AA and BB. Let BB returns a resultset ie.. it has a cursor defined in it and has some values collected in it during the execution of the procedure.

I call the procedure BB from AA and I want to store those values returned by the procedure BB in a table, i use ' Associate result locators' and 'Allocate cursor' in the calling procedure AA. from the allocated cursor i fetch the values and then insert them in to the table.

is there any simple way to do this...

regards,
Sn
Reply With Quote
  #2 (permalink)  
Old 01-10-06, 02:52
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
sp

this is the easiest way todo.. even to get from sysproc sp we use this kind of code and never had a problem..
__________________
Best Regards, Guy Przytula
DB2/ORA/SQL Services
DB2 DBA & Advanced DBA Certified
DB2 Dprop Certified
http://users.skynet.be/przytula/dbss.html
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