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 1 | column 2 | column 3 | field 1 | field 2 | field 3 | field 1 | field 2 | field 3 | ||
a | a | x | a | b | a | b | xx | |||
b | b | x | d | f | d | f | ||||
a | b | xx |
The Join function only works for one column. Does any one have some tips to share?
Cheers!
-Adam
Solved! Go to Solution.
concatenate field 1 and field 2 to form a key field (eg field12) in both tables, then do the join
concatenate field 1 and field 2 to form a key field (eg field12) in both tables, then do the join
Thanks Dan! Totally worked. I'd thought about doing that yesterday but never attempted it. Seemed too simple and clean.
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.