Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to do var substitution?
Message
From
30/01/2001 17:19:27
 
 
To
30/01/2001 15:47:05
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00470308
Message ID:
00470373
Views:
38
TSQL does not allow you to parameterize the FROM clause of a query. What about making your cleanup routine a stored procedure. Prefix the name with sp_ and save it into the master database. Have another routine create a cursor of all the user databases and use dynamic sql to issue a USE command and execute your cleanup routine.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform