Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
USE with a variable
Message
De
22/03/2011 14:34:11
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Scripting
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01504526
Message ID:
01504551
Vues:
51
>It reverts back to the current DB after EXECUTE (which is a separate batch) completes.
>
>
>
>SELECT DB_NAME()
>
>EXECUTE(@Command + ';SELECT DB_NAME()')
>
>SELECT DB_NAME()
>
I see. So, basically, the USE command would not serve me any purpose here as I negotiate with two databases in the script. So, wherever applicable, I will have to specify the database name in front the of the table.

Thanks
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform