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 > Use a cursor as a temporary table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-02-05, 17:39
KimballJohnson KimballJohnson is offline
Registered User
 
Join Date: Aug 2004
Posts: 51
Use a cursor as a temporary table

Is it possible to merge two or more cusors within the scope of a stored procedure?

That is, can we declare cursors, open them and then 'select' from them into a third cursor that is returned to the client?

Thanks,

Kimball Johnson
Reply With Quote
  #2 (permalink)  
Old 02-02-05, 19:03
jacampbell jacampbell is offline
Registered User
 
Join Date: Jan 2005
Posts: 191
If the columns selected from the two cursors are compatible then use one cursor with UNION ALL between the selects.

If they are incompatible what do you expect the user to see???? You'll have to use 2 result sets.

James Campbell
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