Select to view content in your preferred language

Select duplicate rows in FGDB attribute table using SQL

901
2
07-11-2023 10:14 AM
Status: Open
Labels (1)
Bud
by
Honored Contributor

Edited.

As far as I know, there isn't a way to select rows in a file geodatabase attribute table where there are duplicates in a certain column. The docs say it can't be done using SQL since FGDB SQL is limited. Could FGDB SQL be enhanced?

I'm aware of the Find Identical (Data Management) geoprocessing tool. But I think that tool creates a separate table. Whereas I want to select rows in the attribute table.

2 Comments
AllenDailey1

Good idea!

I have a way of doing this with Python, but of course that's a lot more complicated than simply being able to perform a selection.  You use an arcpy Update Cursor, add each row's value for that field to a list if the value is not in the list already, and if it is in the list, then you put a value in a different field to indicate that it's a duplicate value.  Like, the field could be "Duplicate" and the value you enter for that row would be "yes."  Then later you can select all the rows that have "yes."  That wouldn't select the first row that had the duplicate value, but I know it would be possible to do that, with different use of the value list or what you put into the "Duplicate" field.