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 |
|
JNotenboom
Starting Member
27 Posts |
Posted - 2001-02-20 : 10:23:11
|
| Hello,I have a problem with one of my statments. I want to insert records from one table into another table. These two tables have the same primary keys set up. In fact, I want to insert the records which do not exist in the destination table. Code: insert tbl_Xselect Sales, CustCode, YTDUnits, YTDAmount, SalesPreviousYearfrom tbl_Yminusselect Sales, CustCode, YTDUnits, YTDAmount, SalesPreviousYearfrom tbl_XThe code generates this error:Server: Msg 213, Level 16, State 4, Line 1Insert Error: Column name or number of supplied values does not match table definition.what is going wrong and can it be the MINUS word? Is there an alternative?thanxJohan NotenboomIntelli Solutions |
|
|
|
|
|