Insert into Table from #tempTable fails
Posted
by AJ
on Stack Overflow
See other posts from Stack Overflow
or by AJ
Published on 2010-05-06T23:05:36Z
Indexed on
2010/05/06
23:08 UTC
Read the original article
Hit count: 239
I am simply taking the data from a Table and insert it into #tempTable then delete the data, and insert it back to the table. I get "Insert Error: Column name or number of supplied values does not match table definition." Error.
Here are the lines 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?
© Stack Overflow or respective owner