Select to view content in your preferred language

Duplicate OID between states

3361
2
Jump to solution
12-21-2015 07:58 AM
ChrisMathers
Deactivated User

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?

Capture.JPG

0 Kudos
1 Solution

Accepted Solutions
ChrisMathers
Deactivated User

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.

View solution in original post

0 Kudos
2 Replies
ChrisMathers
Deactivated User

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.

0 Kudos
ChrisMathers
Deactivated User

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.

0 Kudos