Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursors
Message
 
 
To
17/06/2011 13:28:41
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01514874
Message ID:
01514925
Views:
69
>>That's not true. GO just separates batches in SSMS. The creation of stored procedure must be the only thing in the batch.
>>
>>In other words, GO in the code above has nothing to do with the temp tables.
>
>DECLARE @temp INT
>SET @temp = 1
>
>GO
>
>print @temp
>
>yields:
>Msg 137, Level 15, State 2, Line 2
>Must declare the scalar variable "@temp".
>
>
>ergo my previous assertion of clear local variables is true...

If we're talking about variables, then yes, of course. But the topic of the discussion was about temp tables.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform