Insert into table from #tempTable fails
I just take the data from the table and insert it into #tempTable, then delete the data and insert it back into the table. I get "Insert error: Column name or number of given values does not match table definition." Error.
Here are the lines that I am running.
SELECT * INTO #tempTable FROM dbo.ProductSales
SELECT * FROM #tempTable
DELETE FROM dbo.ProductSales
INSERT INTO dbo.ProductSales SELECT * FROM #tempTable
Any idea?
+2
a source to share