I'm wondering if it is possible to create a variable name when copying a table to another.
Here's my sort-of algorithm/code
DECLARE @NewTableName VARCHAR(50)
SET @NewTableName = 'MyTable_'+GETDATE() --MyTable_12282010 (for example)
SELECT *
INTO @NewTableName
FROM MyTable
I'm wondering if this is possible. I tried it before, but it failed. Any suggestions guys?