March 7, 2011 at 5:42 am
Is there any way to store multiple resultsets returing from one stored procedure into temporary objects?
Lets say there is a stored procedure SP1 which returns two resultsets - one resultset has 2 columns and second resultset has only 1 column.
Then call the stored procedure SP1 within another stored procedure SP2. And want to save resultsets of SP1 into temporary table within SP2.
Thanks in advance!!!!
March 7, 2011 at 5:57 am
No, I think you'd need to rewrite SP1 so that it only returns one result set, then write another stored procedure to return the second result set.
John
[Edit - rewrote reply after re-reading the original question]
March 7, 2011 at 6:06 am
In my case the stored procedure SP1 is returning two resultsets say resultset1 (has 2 columns of int type) and resultset2 (has only one column of varchar type).
What I want is I am calling the SP1 from another stored procedure SP2 and want to save the resultset2 into temporary table.
March 7, 2011 at 6:11 am
may be it is possible through returing multiple results in one single xml and again seperating the xml to different set of tables
Regards, Yog
March 7, 2011 at 6:25 am
For this need to change the existing stored procedure.
Anyways can you please give some sample code?
March 7, 2011 at 6:28 am
I prefer the one where you have a go at writing it yourself, and post back with what you've tried if you run into any particular problems.
John
March 8, 2011 at 5:53 am
any updates????
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy