Joining Tables on Multiple Columns/Conditions

766
3
Jump to solution
04-05-2022 08:52 PM
adamwade1
New Contributor III

Greetings ESRI ArcGIS Community!

I'm sure this question has been asked several times already, but thus far I've not seen a solution. I'm working with a feature class and table. I need to join or copy rows from a column in the table into the feature class  if attributes from two fields in the feature class match those from two columns in the table. Hopefully this example does a better job of explaining. 

 Table   Feature Class  Joined Feature Class 
column 1column 2 column 3 field 1field 2field 3 field 1field 2field 3
aax ab  abxx
bbx df  df 
abxx        

 

The Join function only works for one column. Does any one have some tips to share?

Cheers!

-Adam 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

concatenate field 1 and field 2 to form a key field (eg field12) in both tables, then do the join


... sort of retired...

View solution in original post

3 Replies
DanPatterson
MVP Esteemed Contributor

concatenate field 1 and field 2 to form a key field (eg field12) in both tables, then do the join


... sort of retired...
adamwade1
New Contributor III

Thanks Dan! Totally worked. I'd thought about doing that yesterday but never attempted it. Seemed too simple and clean. 

0 Kudos
DanaNolan
Occasional Contributor III

It is not so clean; it often won't work well with longer fields (misses many matches). It also randomly pdoes not work perfectly even with shorter fields, even after trying everything down to re-creating fields and copying the data over so it has to match (plus many other debugging tricks). But most of the time, it works fine. Just watch the matched records counts to be sure.

0 Kudos