Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
@@Variable??
Message
De
23/11/2005 02:58:57
 
 
À
22/11/2005 12:57:38
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
01071134
Message ID:
01071471
Vues:
16
No you can not declare global variables. To share temporary information between sessions you have to put it into a global temporary table. To declare a global temporary table, use the ## (double #) prefix on the table name. To be honest, I haven't really come across a need for this, apart from debugging.

Mace

>Does that mean that one can not add a global variable, or that it is done differently than a declaration. If the latter, how is it done??
>
>>Normally the @@ or double @ is used to denote a global variable, but as these can not be declared it's use in your case is redundant.
>>
>>Mace
>>
>>>I have come across some SQL code in a legacy database here that uses variables declared as
>>>
>>>DECLARE @@ThisVariable Char(25), ... etc.
>>>
>>>I have not seen, nor do I find, any reference to a variable so declared in the BOL. I need to update this proceedure, and do not want to cause any problems due to a lack of understanding. Any help is appriciated, as always. :)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform