Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cursors
Message
 
 
À
17/06/2011 13:28:41
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01514874
Message ID:
01514925
Vues:
70
>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform