Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variables in Select Statements
Message
De
21/09/1999 13:16:53
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Variables in Select Statements
Divers
Thread ID:
00267214
Message ID:
00267214
Vues:
65
I am trying to use a select statement using a variable for the database in the from clause.. ie

declare @MyVariable varchar(40)

select ColumnName
From @MyVariable

But it wont accept it.. I have tried putting the variable in [ ] but it still does the same thing.

The database name is in the varaible so it should work, and I take the variable out and put the database name in it works.



Thanks,
Jason
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform