I am doing a reconciliation from two different data set to find variances but when I do a full outer join between the tables I get duplicates if one of the tables are more than one row for the merge fields. There no unique identifier so I'm merging them using Resource, Date and hours
Table A | |||
Resource | Invoice ID | Date | Hours |
John Doe | 12345 | 8/28/2023 | 40 |
Table B | |||
Resource | Invoice ID | Date | Hours |
John Doe | 45678 | 8/28/2023 | 40 |
John Doe | 98765 | 8/28/2023 | -40 |
John Doe | 76543 | 8/28/2023 | 40 |
Here's what I'm getting:
Table A Resource | Table A Invoice ID | Table A Date | Table A Hours | Table B Resource | Table B Invoice ID | Table B Date | Table B Hours |
John Doe | 12345 | 8/28/2023 | 40 | John Doe | 45678 | 8/28/2023 | 40 |
John Doe | 12345 | 8/28/2023 | 40 | John Doe | 98765 | 8/28/2023 | -40 |
John Doe | 12345 | 8/28/2023 | 40 | John Doe | 76543 | 8/28/2023 | 40 |
Here's what I want to see:
Table A Resource | Table A Invoice ID | Table A Date | Table A Hours | Table B Resource | Table B Invoice ID | Table B Date | Table B Hours |
John Doe | 12345 | 8/28/2023 | 40 | John Doe | 45678 | 8/28/2023 | 40 |
40 | John Doe | 98765 | 8/28/2023 | -40 | |||
40 | John Doe | 76543 | 8/28/2023 | 40 |
Can someone help me, please?
This only works for the first record. If there's a same information for another resource, then I'm getting all records from Table A and Table B without any match. For example: If my table are:
I'm getting:
What I want to get is:
If a data is only in Table B, I would want the merged record in Table A to show null. How can I compare a null value to previous row only for data that are in both tables?
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2