Violation of PRIMARY KEY constraint ‘PKCM20100’. Cannot insert duplicate key in object ‘dbo.CM20100’.
*This post is locked for comments
Violation of PRIMARY KEY constraint ‘PKCM20100’. Cannot insert duplicate key in object ‘dbo.CM20100’.
*This post is locked for comments
I am not even pretending I know more than Leslie but Sandip had a smiler issue answered. It had to with skipped identity column values and updating the same. Cm40102 is the the table that is in play here
Here is the link.
DynamicsDev brings out a good point. The duplicate wouldn't already exist in the target table. That is the problem, you are trying to insert a duplicate record. If you look at the fields
CMDNUMWK
VOIDED
of the document you are trying to insert, you should find that one already exists in the table. Time will not fix this kind of error. The 'same order' must have one of the fields different. I suspect it is the Voided field.
Kind regards,
leslie
The error is saying it was trying to insert duplicate records into the table. Not that there are duplicate records in the table already.
Hi Vail
Thanks for your reply,
But in that table there is no duplicate records and still i'm getting the same issue.
and if i place same order after some time it was working fine without any issue.
I Hope you will help me out !
Mallesh,
The Primary Key for table CM20100 contains 2 columns:
CMDNUMWK
VOIDED
This error message is telling you that a record already exists in the table that matches the key of the record you are trying to insert. Run a query against the CM20100 and then you'll find the document. It has been my experience that Primary Key errors are never wrong.
Kind regards,
Leslie
I did n't get you RogetRogerATX
Run checklinks first, but this will happen if you have the same record in both the work and open tables.....
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156