Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
USE command in SP
Message
De
09/10/2005 21:44:01
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Titre:
USE command in SP
Divers
Thread ID:
01057586
Message ID:
01057586
Vues:
85
Hi,

Normally, in QA, we can switch to another database using the USE command
like 'use DBX'.

However, we can use it in our normal SP. Therefore, I not sure
whether using dynamic SQL to 'switch' database in SP will still work
as in QA like

SET @execstr = 'USE '+@@db_name
EXEC(@execstr)


Cos I am using some DBCC CONTIG command to check for index
and need to switch to that database to use it.

Please advise or comment. Thank you
Best Regards
Virusim
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform