• You can use a GLOBAL cursor and use dynamic SQL just to declare the cursor. You can process it in static code, including deallocating the cursor at the end.

    SQL DBA,SQL Server MVP(07, 08, 09) A socialist is someone who will give you the shirt off *someone else's* back.