Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#temp from prod - error on insert back into prod from #temp

Status
Not open for further replies.

LNBruno

Programmer
Jan 14, 2004
936
US
Anyone hit this one before?
Code:
          SELECT *
           INTO #tempTable
           FROM dbo.ProdTable
          WHERE 1 = 0
          
         INSERT #tempTable
         SELECT --list of values from other tables; column count matches
         
 TRUNCATE TABLE dbo.ProdTable

         INSERT dbo.ProdTable
         SELECT *
           FROM #tempTable

Msg 213, Level 16, State 5, Line 1
Insert Error: Column name or number of supplied values does not match table definition.
NOTE: The error occurs at the end when attempting to insert into dbo.ProdTable.

< M!ke >
[small]Anything is possible if you don't know what you're talking about.[/small]
 
I bet you one million dollars it is a computed column.

medium_dr_evil_1.jpg


[small]----signature below----[/small]
Now you can go where the people are one!
Now you can go where they get things done!
 
Denis, are you a member of the PDN (Psychic Developers Network)???

There WAS a computed column from the prod table!

Thank you for this valuable post! ;-)

< M!ke >
[small]Anything is possible if you don't know what you're talking about.[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top