>>Do you mean you would try to deallocate cursor that didn't exist? Let me try, though you can always use TRY/CATCH in 2005.
>>
>>Well, it did produce an error if the variable was not declared:
>>
>>Must declare the scalar variable "@myCursor".
>
>Yes, TRY/CATCH would have done it. But, Sergey mentioned to declare it local which is exactly what I need.
I just tried it and it didn't work for me. I'm also not seeing this syntax in BOL.
If it's not broken, fix it until it is.
My Blog