declare @sql varchar(8000) set @sql='SELECT * into pond_history_temp'+convert(varchar(10),getdate(),112) +' FROM gms.dbo.pond_history_temp 'exec(@sql)