I have a database I am trying to compress but when I do it throws an error that there is a duplicate primary key. The OID is given and when I select it in SSMS I only get one row and when I count rows returned it is only 1. If I search for it in ArcMap I get one row selected but the selection count is 2. Deleting the row from ArcMap didn't help because the error is in an older state than the default which is what I edited and it still shows up in SSMS some how. There are 3500 states right now. Which is odd in itself because there were only 1558 on Friday and no one was working over the weekend. Is it database safe for me to kill that record from SSMS?
Solved! Go to Solution.
Deleted the last entry for that OID in the add table and it compressed. Dont know why the GDB thought that one row was two rows and tried to re-commit with the same primary key but thats how to fix it if this happens to you. The feature was created by Cartegraph a third party work order software.
In the add table for that feature class I found four records for that OID and two of them are are dated 2 seconds apart by the editor tracking. All have different state ID numbers.
Deleted the last entry for that OID in the add table and it compressed. Dont know why the GDB thought that one row was two rows and tried to re-commit with the same primary key but thats how to fix it if this happens to you. The feature was created by Cartegraph a third party work order software.