Sunday, March 25, 2012

Cursor for a result set returned by a stored proc

Hi all,

i got a question. I have a stored procedure sp1 calling another stored procedure sp2 using Exec sp2 cmd.

sp2 returns 2 rows in the result set.
Now I want to loop thru those 2 rows and get access to its column values
from sp1. How can this be acheived?

thanks for your help

omair-I came across this after reading your post:

One legitimate use for temp tables is to use them to pass recordsets from a nested stored procedure to a calling stored procedure. This is the only way to pass recordsets from one stored procedure to another. When you do this, follow the other tips on this Web site to maximize temp table performance. [6.5, 7.0, 2000] Updated 3-6-2006

Hope it helps.

Hannah

No comments:

Post a Comment