Hi Experts,
I have a stored procedure which returns 2 record sets, would like to capture both in separate temp tables. Is there any way to do?
Please help.
Thanks,
Naveen J V
Hi Experts,
I have a stored procedure which returns 2 record sets, would like to capture both in separate temp tables. Is there any way to do?
Please help.
Thanks,
Naveen J V
That's not possible, you can insert only the first resultset to one target table.
I'd like to modify Olaf's answer a little bit.
It is possible if the two temp tables have the same set of columns. In that case, you can use INSERT-EXEC.
On my web site I have an article How to Share Data Between Stored Stored Procedures, where I discuss alternatives.
10 people are following this question.