Hello,
I need to compare two tables that have a common column, "Old Record ID." They have the same columns, and share some values, but each table contains unique values that I want to highlight. The tables can be joined across Old Record ID. Old Record ID and New Record ID have a 1:1 relationship. There are multiple groups, and each group has multiple values.
I want the output to have 8 columns, with all of the columns from each table. If there are any rows that are exactly the same, I'd like to combine them in the output. If one table contains values that the other table does not contain, I'd like to leave the values blank. I tried using a join tool, but it kept spitting out too many rows for some reason. Thank you!
Please see example below:
Table 1
(T1) New Record ID | (T1) Group | (T1) Value | (T1) Old Record ID |
UN1 | Group1 | Y | Unique1 |
UN1 | Group1 | X | Unique1 |
UN1 | Group1 | Z | Unique1 |
UN2 | Group1 | Z | Unique2 |
UN2 | Group2 | A | Unique2 |
UN2 | Group3 | M | Unique2 |
UN2 | Group3 | N | Unique2 |
UN3 | Group1 | Y | Unique3 |
UN4 | Group1 | Z | Unique4 |
UN4 | Group3 | P | Unique4 |
Table 2:
(T2) New Record ID | (T2) Group | (T2) Value | (T2) Old Record ID |
UN1 | Group1 | Y | Unique1 |
UN1 | Group1 | Z | Unique1 |
UN1 | Group2 | A | Unique1 |
UN2 | Group1 | Z | Unique2 |
UN2 | Group2 | A | Unique2 |
UN2 | Group3 | M | Unique2 |
UN2 | Group3 | N | Unique2 |
Desired output -- Comparison of Table 1 and Table 2:
(T1) New Record ID | (T2) New Record ID | (T1) Name | (T2) Name | (T1) Value | (T2) Value | (T1) Old Record ID | (T2) Old Record ID |
UN1 | Group1 | X | Unique1 | ||||
UN1 | UN1 | Group1 | Group1 | Y | Y | Unique1 | Unique1 |
UN1 | UN1 | Group1 | Group1 | Z | Z | Unique1 | Unique1 |
UN1 | Group2 | A | Unique1 | ||||
UN2 | UN2 | Group1 | Group1 | Z | Z | Unique2 | Unique2 |
UN2 | UN2 | Group2 | Group2 | A | A | Unique2 | Unique2 |
UN2 | UN2 | Group3 | Group3 | M | M | Unique2 | Unique2 |
UN2 | UN2 | Group3 | Group3 | N | N | Unique2 | Unique2 |
UN3 | Group1 | Y | Unique3 | ||||
UN4 | Group1 | Z | Unique4 | ||||
UN4 | Group3 | P | Unique4 |
@Thanks4YourHelp , Based on your desired output you will have to outer join the data on the basis of OldRecordID, Group and Value fields as below: