Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stored Procedures for many databases
Message
 
 
To
09/04/2001 15:26:10
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Miscellaneous
Thread ID:
00493692
Message ID:
00493744
Views:
23
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform