Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variables in Select Statements
Message
From
21/09/1999 17:11:00
 
 
To
21/09/1999 13:16:53
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00267214
Message ID:
00267341
Views:
23
You can use dynamic SQL to do what you want. Try this

USE pubs
DECLARE @tablename varchar(30)
SELECT @tablename = 'authors'
EXECUTE ('SELECT * FROM ' + @tablename)


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

Click here to load this message in the networking platform