September 28, 2005 at 7:17 am
Can I get a results of a procedure into a cursor?
For Eg:
Instead of using Declare test_cursor cursor for Select * from Table1
Can I use Declare test_cursor cursor for exec testproc
September 28, 2005 at 7:23 am
AFAIK, you cannot do it.
You can define a temporary table and save the results of your SP there. Then open the cursor by select from the temp table.
September 28, 2005 at 7:24 am
Thanks for the reply. That is what I intended to do if I had no solution for this one.
September 28, 2005 at 7:38 am
Of course if you are going to bounce the records into a temp table then you can add an identify column to your temp table and dispense with the cursor entirely.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply