Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To Do A Select * From @TableName ?
Message
 
 
À
11/09/2006 10:51:22
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01152754
Message ID:
01152757
Vues:
23
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform