Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Trininole
Yak Posting Veteran
83 Posts |
Posted - 2011-11-30 : 12:26:53
|
I am trying to insert data from one table to another using the insert to option, when i right click on the table then click script table as, then insert to query editor window using SQL Server, and when i type in the syntax:select *from dhmefmI get the following error message:Msg 121, Level 15, State 1, Line 1The select list for the INSERT statement contains more items than the insert list. The number of SELECT values must match the number of INSERT columns.Can someone help me on this?Roger DeFour |
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-11-30 : 12:30:42
|
This is one reason that select * is bad. Does the table you're selecting from or to have an identity column? If so, remove those from your query.JimEveryday I learn something that somebody else already knew |
|
|
sandy123
Starting Member
14 Posts |
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|