[GIS] extra records when joining tables in ArcGIS

arcgis-desktopattribute-joinsexport

I've been having a problem in ArcGIS 10.4.1 when performing larger joins (either attribute joins or spatial joins)–that is, with around 2,000 to 6,000 points. The join seems to work fine, but then when I export the joined tables out to a new table (all this is in one geodatabase), some of the records are repeated. That is, I may start with 3400 points in one table, join another smaller table, and then export the result (also 3400 records), but end up with 3412 points in the new table (the 12 extra records seem to be duplicates).

Any idea why this is happening, and how to handle it? Is it some kind of internal memory issue?

So far the only "workaround" I've found is to select and then copy all the records in the joined attribute tables out to Excel, then import them back to ArcGIS and re-plot the points, which is fairly tedious. Splitting the datasets into 2 or 3 smaller sets also seems to resolve the issue, but again, is annoying. Any advice would be most welcome.

Best Answer

At ArcMap 10.1, for data in the same geodatabase, any time that you join two data sources together that have a 1:M relationship (two or more records match on the join field in the joined table) the full set of related records are expanded to complete all record combinations whenever the data is exported. So your join table has some duplicate values in the join field that match the same record in your primary table. This is a good behavior, since that is how Access and other databases deal with these relationships, and it exposes false assumptions that two data sources have a 1:1 relationship when in fact they have a 1:M relationship. Perform a summary on the join field in the join table and look for any values with a frequency of 2 or more.

For Spatial Joins the number of points should not expand unless you inputted a layer as the target that had a 1:M attribute join in place, or you chose the One To Many output option and had points that touched the boundary of two or more polygons/lines.

Related Question