Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stored Procedures for many databases
Message
 
 
À
09/04/2001 15:26:10
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
00493692
Message ID:
00493744
Vues:
22
>So I could in fact hardcode the table names, but I would not be able to hardcode the database names. So, as such I would assume I would agian lose the benefit of the SP????
>
>Thanks again

Yes. When you specify the table name as owner.tablename in your SP, if you don't specify the database, it assumes the current one. If it isn't supposed to be the current one, you need to specify it using the database.owner.tablename syntax. Because a variable can't be used, you have to dynaically build the SQL string and then execute it.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform