PARAMETERS @Table1 text, @Table2 text; Insert Into @Table2 Select * From @Table1;
DECLARE @Dest varchar(20) DECLARE @Src varchar(20) SET @Dest = 'copydat' SET @Src = 'myTable' DECLARE @myQuery AS VARCHAR(200) SET @myQuery = 'INSERT INTO ' + @Dest + ' SELECT * FROM ' + @Src EXEC (@myQuery)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)