Hi Team,
Hope your well .
I am hoping you can help me (My mind is drawing a blank)
I have 2 input files which consists of the following ;
Input 1
| ID | Practice_ID |
| 001j000000eKjdHAAS | 123456 |
Input 2:
| ID | Practice_ID |
| 001j000000eKjdAAAS | 123456 |
| 001j000000eKjdCAAS | 123456 |
| 001j000000eKjdDAAS | 123456 |
| 001j000000eKjdEAAS | 123456 |
| 001j000000eKjdFAAS | 123456 |
| 001j000000eKjdGAAS | 123456 |
| 001j000000eKjdHAAS | 123456 |
| 001j000000eKjdIAAS | 123456 |
| 001j000000eKjdiAAC | 123456 |
What i would like to do is following ;
1) Using Id in "Input 1" search for the Id in "Input 2" and when the IDs match then in a new Column called "Outcome" tag the Record "HQ"
2) Where the Remaining Ids & Practice Id doesn't match back to "input 1" then in the Outcome column tag "Office"
3) Produce a new Column called "Parent id"
4)Populate the HQ ID in the "Parentid" field where the HQ Practice_ID matches the other Practice_ID
NB : Where Outcome = HQ, Parentid should be blank
Expected OutCome :
| ID | Practice_ID | Outcome | Parentid |
| 001j000000eKjdAAAS | 123456 | Office | 001j000000eKjdHAAS |
| 001j000000eKjdCAAS | 123456 | Office | 001j000000eKjdHAAS |
| 001j000000eKjdDAAS | 123456 | Office | 001j000000eKjdHAAS |
| 001j000000eKjdEAAS | 123456 | Office | 001j000000eKjdHAAS |
| 001j000000eKjdFAAS | 123456 | Office | 001j000000eKjdHAAS |
| 001j000000eKjdGAAS | 123456 | Office | 001j000000eKjdHAAS |
| 001j000000eKjdHAAS | 123456 | HQ | |
| 001j000000eKjdIAAS | 123456 | Office | 001j000000eKjdHAAS |
| 001j000000eKjdiAAC | 123456 | Office | 001j000000eKjdHAAS |
Looking forward to your response
Masond3