"Violation of Primary key" or "DBMS 2627" error messages when you post or print in Payables Management
Symptoms
When you try to post or you try to print in Payables Management in Microsoft Dynamics GP or in Microsoft Business Solutions - Great Plains,youreceive one of the following error messages:
Error message 1
Violation of Primary key
Error message 2
Error attempting to insert duplicates.
Error message 3
DBMS 2627
Cause
These errors occur after some type of posting interruption. Typically, a transaction is written to the history table. However, the interruption occurs before the transaction is removed from the work table or from the open table. Therefore, the transaction exists in both tables and violates the primary key fields of the table.
Resolution
To resolve the problem, locate the duplicate records and then remove the appropriate record manually. This article is designed only to assist you in locating the duplicate records. If you need assistance in removing the problem records, you may contact Microsoft Technical Support or your Partnter.
-- PM Duplicates |
select DOCTYPE, VCHRNMBR, COUNT(*) as [COUNT] from |
( |
select DOCTYPE, VCHNUMWK as VCHRNMBR from PM10000 W |
UNION ALL |
select DOCTYPE, VCHRNMBR from PM10300 P |
UNION ALL |
select DOCTYPE, VCHRNMBR from PM10400 M |
UNION ALL |
select DOCTYPE, VCHRNMBR from PM20000 O |
UNION ALL |
select DOCTYPE, VCHRNMBR from PM30200 H |
) C |
group by DOCTYPE, VCHRNMBR |
having COUNT(*) > 1 |