Hi.
Looking for some assistance. I have two tables that I need combine to create a third. In one table I have three column of keys- (key1-key3). This table is automatically updated to consolidate and match using some fuzzy match resulting in a person's key being changed throughout the year from [oldkey1] to [newkey2] to a final key named [finalkey3]. This can happen when an individual visits different locations and are assigned different keys. (see row 3 and row 4 #10082782) which resulted in a final key determination of 36678 for this one individual.)
I have another table that I need to match against this three column key table. This other table contains a [key] which can be matched against the first table to arrive at a finalkey which will be the official assignment for each person. In this second table I have isolated just one person, but this person's data was entered under two different keys 10082792 & 71595)- but is ultimately person id#36678. Does anyone know how I can hit this second table against the first table to run and check each column (oldkey1, newkey2) to arrive at a final key? Any help would be appreciated. Thank you in advance
table 1
OLDKEY1
NEWKEY2
FINALKEY3
8172456
5230020
5230020
43015
8016157
8016157
2208
10082792
36678
71595
10082792
36678
85165
6572623
6572623
98048
7377116
7377116
102813
1405523
1405523
115732
2129398
2129398
table 2
KEY
PID
PID2
10082792
2
8
71595
9
0
results table
KEY
PID
PID2
finalkey
10082792
2
8
36678
71595
9
0
36678
... View more