Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use variabe as table name
Message
 
 
À
20/09/2004 16:24:57
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00944216
Message ID:
00944326
Vues:
15
You can use dynamic SQL. See Re: Dynamic SQL Message #907449.

>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]
>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform