I have two tables with similar data. I want them to join on three elements:
t1.A = t2.A
t1.B = t2.B
t1.C = t2.C
Simple enough.
Except:
- t1 has 564 cases. t2 has several thousand. For each case of A, B, and C in t1, there is between 1 and n cases in t2.
- There are multiple rows in t1 where A, B, and C are equal, and differ on a different element - say D. D is wholly distinct.
- t2 has multiple rows where A, B, and C are equal and differ on D as well. D is wholly distinct.
- t1.D is mutually exclusive from t2.D. There is no overlap of any kind.
- the output needs to have one row per combination, where all elements of t1 are prior to all elements of t2 moving left to right (the easy part) AND I only want one match per entry of t1 AND there can be no duplicates of t2.D (the hard part)
Help?
t1.A = t2.A
t1.B = t2.B
t1.C = t2.C
Simple enough.
Except:
- t1 has 564 cases. t2 has several thousand. For each case of A, B, and C in t1, there is between 1 and n cases in t2.
- There are multiple rows in t1 where A, B, and C are equal, and differ on a different element - say D. D is wholly distinct.
- t2 has multiple rows where A, B, and C are equal and differ on D as well. D is wholly distinct.
- t1.D is mutually exclusive from t2.D. There is no overlap of any kind.
- the output needs to have one row per combination, where all elements of t1 are prior to all elements of t2 moving left to right (the easy part) AND I only want one match per entry of t1 AND there can be no duplicates of t2.D (the hard part)
Help?