Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Do A Select * From @TableName ?
Message
 
 
To
11/09/2006 10:51:22
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01152754
Message ID:
01152757
Views:
22
This message has been marked as the solution to the initial question of the thread.
See Re: What wrong in my sql statment ? Message #1037430

>If I do this...
>
>declare @TableName as varchar(50)
>set @TableName = 'MyTable'
>select * from @TableName
>
>I got the follwing error...
>Must declare the variable '@TableName'.
>
>Why my variable is not recognized as table name?
>Something wrong? How can I use a table name in variable?
>Thank you!
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform