I have a situation where one SQL Server stored procedure is calling another one and both happen to use cursors that have the same name. This is causing a conflict as apparently the cursors don't have visibility restricted to the stored procedure where they are declared.
Is there any way to make the cursors private to the procedure they were declared in?
Apparently there is a local keyword.
http://www.codeguru.com/cpp/data/mfc_database/sqlserver/article.php/c7177