1

I have 2 files and I merged them together into one file-geodatabase feature class. I want to remove entries from File1, Column C, that also appear in File2, ColumnD. I attempted to use the geoprocessing tool DeleteIdentical but it deletes from EITHER File1 or File2 (aka Column C or Column D). I need to specify that only rows from File1 (Column C) should be deleted. I can distinguish in the merged File1_2_Merge which column belongs to which file. I am using ArcGIS 10.2 Desktop. All 3 files are file-geodatabase feature classes.

  • 1
    I don't believe there is a builtin tool to do this. I would go the route of using a search cursor. – papadoo May 22 '15 at 18:11
2

I would eliminate the duplication before the merge, then address this in a couple of steps.

  1. Join File2 to File1 (Right-click File1 in the table of contents, choose Joins and Relates/ Join, Join attributes from a table. Base the join on Column C. The table to join to this layer will be File2, and the field to base the join on will be Column D. Choose Keep all records. This will retain File1 as-is but also include a new column to represent File2.)
  2. Select features from File1 where Column D is not null (these will be the rows where Column C and Column D match, so, your duplicate rows).
  3. Delete your selection from File1.
  4. Remove the join from File1 (Right-click File1 in the table of contents, choose Joins and Relates/ Remove Join(s) and remove the File2 join).
  5. Then re-merge Files 1 & 2, if so desired.
  • I started to do this but got stuck after step3. Before I remerge, I want to delete all of the extra columns that File 2 added to File 1. Oddly, right clicking on the columns to delete leaves me with a grayed out 'delete' instead of a selectable 'delete.' – WolverineTime May 22 '15 at 20:58
  • 1
    Ah - I think you just need to remove the join first. I'll edit my answer. – Andy May 26 '15 at 14:51
  • Thanks @Andy! I took your advice but slightly modified it so that after the join I ended up selecting by attribute: IS NULL. Then I exported those to a new file and then merged that. – WolverineTime May 26 '15 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.