Not sure why it worked, but it did.
I was expecting problems with the scope of myCsr.
Declaring the cursor within an Execute statement gives it the scope of the SP.
Hi MikeD. FYI. On the issue of scope, if you start nesting stored procedures, then the cursor names must be different. If you called another stored procedure from the SP you are in and used the same cursor name it would give an error.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.