Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use variabe as table name
Message
De
20/09/2004 16:24:57
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Use variabe as table name
Divers
Thread ID:
00944216
Message ID:
00944216
Vues:
55
I like to create a table having name related to the created day. For example,
its name will be Survey20040920 if it is created today. Is it possible?

I used following SQL, but it didn't work.


Declare @Surveyfilename varchar(50)
set @Surveyfilename= 'Survey'+CONVERT(char(8), getdate(), 112)

select * into @Surveyfilename FROM [Survey]


Thanks


Jim
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform