Select to view content in your preferred language

Join fails after indexing table

3484
6
05-25-2016 06:49 AM
BrianLomas
Frequent Contributor


While in arcmap joining a table to a polygon layer I'm prompted to index the joining table. If I do index the table then the join fails but if I decline the join will work. I'm joining based on OID of the polygon layer. Anybody have any ideas what might cause this? I ask because once indexed the table will not join with this layer ever again.

0 Kudos
6 Replies
AdrianWelsh
MVP Honored Contributor

Brian,

What version of ArcMap are you using? Have you tried creating a different instance of this feature class in order to see if the join will work then (a copy)? How is your data stored (shapefile, geodatabase, etc.)?

Also, I wonder if it has something to do with indexing the OID. Maybe you can make a new field and copy the OID values over and try joining with that new field instead.

0 Kudos
NeilAyres
MVP Alum

And, if I may add, using the OID of the feature as a join item is a bad idea.

It could change if you edit the feature.

If this is a once off, as Adrian has said, add a new item to your feature and calculate the OID across to it.

And, I hope that in the join table the join item is not called OID or OBJECT_ID or anything like that.

0 Kudos
BrianLomas
Frequent Contributor

The polygon fc is in a SQL enterprise geodatabase. I would rather not alter the fc layer with an additional field just for this small project. Also, after joining I'm not editing the fc. I use the join just to cross check data after running a series of geoprocessing tools. There are other methods to check it but I was just curious on what I'm doing wrong. I've never had this happen before.

0 Kudos
BrianLomas
Frequent Contributor

Now, I'm working with different data but same conditions... a SQL feature class trying to join to a shapefile. Copied the OID to a new field but named differently. And again have the same problem, once the fields are indexed zero records match. Before indexing every single one match.

0 Kudos
NeilAyres
MVP Alum

And your new field is a LONG INT, and the join item the same?

Could you give us a picture of the data or perhaps post a sample here.

Sounds very strange. Must be a reason.

0 Kudos
BrianLomas
Frequent Contributor

Yea, new field is a LONG INT... I'm not sure how to upload sample data.

0 Kudos