I want to create backup SQL tables using variable names.
something along the lines of
DECLARE @SQLTable Varchar(20) SET @SQLTable = \'SomeTableName\' +
DECLARE @Script NVARCHAR(MAX); SET @Script = N'SELECT * INTO SomeTableName_' + N'20100526' + N' FROM SomeTableName'; EXEC sp_executesql @Script
I've left the date separate as I assume you want to calculate it for every run.