Select to view content in your preferred language

Failed to open table. Error: An Item with the same key has already been added

6217
6
05-22-2018 08:57 AM
RyanDaily
New Contributor

I keep getting this error message when after joining a table with no spatial data to a Shapefile via a common attribute 

I'm new to ArcGIS but have been able to do this easily using QGIS recently. I have literally no idea what the message means. This has happened with two separate shp files. 

Can someone help please?

0 Kudos
6 Replies
DanPatterson_Retired
MVP Emeritus

table names? field name for join?

I would suggest that you copy your shapefiles into a file geodatabase first... issues with shapefiles that have been produces/used in QGIS have surfaced recently

0 Kudos
AllanSchori
New Contributor

I recreated the error by joining a table with two field names that were the same. Make sure each of your field names in your table are unique.

zkovacs
Frequent Contributor

Ryan,

It means that one or more of the fields in the joined table have the same name as a field/fields in the layer you are joining to. I was very surprised to come across this in Pro since ArcMap has no problem with joining them, regardless having the same field names.

Might be worth raising it with Esri's Tech support as a bug/enhancement (after you've checked that the same join works fine in ArcMap.)

I hope this helps,

Zoltan

0 Kudos
DanPatterson_Retired
MVP Emeritus

I think ArcGIS Pro is being a little more forward thinking in ensuring that requirements are being met

For geodatabase fields....

Define fields in tables—Geodatabases | ArcGIS Desktop 

Field names in the same table must be unique; for instance, you can't have two columns with the name ObjectID. Field names must also start with a letter and not contain spaces or reserved words. Field names are limited to 64 characters for file geodatabases, 31 characters in SQL Server and SQLExpress, 30 characters in Oracle and DB2; dBASE is limited to 10 characters.

There is loads more information there.  The above defines the 'within' table situation.  When joining, the field names do become unique... ie a sample of using Join Field for two polygon featureclasses, keeping the geometry information

zkovacs
Frequent Contributor

Unique field names were always a case when creating new tables/feature classes even in ArcMap. Joins are created with SQL statements and such, the resulting schema is always referred to with fully qualified field names - eg. sourcename.fieldname. Therefore it shouldn't matter if I have the same field name(s) in the table to be joined.

ArcMap is perfectly capable of dealing with this, and if the result is exported the field names are automatically suffixed as '_1', '_2' etc. to ensure the unique field naming. I'd expect the same behaviour in Pro...

0 Kudos
DanPatterson_Retired
MVP Emeritus

Zoltan, my image shows the suffix behaviour… it was done in Pro

0 Kudos