Hi,
I want to backup an important table every week in creating some history tables.
I would like to create a Dts job or script to create every week a table with the day and month in its name. ( like : [important_table_09-07] , [important_table_09-14],... )
Any idea
Thanks.

How should I name my history tables ?
Richard Berg MSFT
Dhaval-Patel
Thanks, but how can I create a stored procedure which create a table with a name depending of the current month/day (or like TableName_YYYYMMDD). I would like to store the creation table date in its name.
Is this possible
Thx
kcdclan
HTH, Jens K. Suessmeyer.
---
http://www.sqlserver2005.de
---
Flack
Ok, thx.
I'v written the stored procedure. My variable @command is correct. But how can I say to execute it
exec @command doesn't work.
I even tried to call the osql.exe through xp_cmdshell :)
rpskumar
SP_EXECUTESQL @COMMAND
HTH, Jens K. Suessmeyer.
---
http://www.sqlserver2005.de
---
MrBrilliant
you will have to use dynamic SQL for that:
SET @Command = 'CREATE TABLE ' + @Tablename + '_' + CONVERT(VARCHAR(8),GETDATE(),112) + (...Columnshere)
HTH, Jens K. Suessmeyer.
---
http://www.sqlserver2005.de
---