Hi,
I would like create a bit tricky query from 2 tables with the Table Transformer macro.
The Teams table contains the Name field where names and PersonIDs are stored together. There are two tricky things here:
- more names can be stored in the Name field,
- brackets can be anywhere in the Name field, not only before and after the PersonID - so that's why I was wondering how to split up the field.
My planned steps:
1) First I would need some support to split up the Name field to get only the PersonIDs (e.g. PersonID-12345, PersonID-15635) from that.
2) And then I would like to join the PersonIDs with LEFT JOIN with the Persons table to have the Person's nickname values.
3) And finally I would like to have the Persons nickname field in the original Team table with the nicknames.
See the sample tables:
| Teams table |
| Team | Name |
| TeamID-1 | John Doe (alias: Johnny) (PersonID-12345) Susie Wilson (PersonID-15635) |
| | |
| Persons table |
| PersonID | Person's nickname |
| PersonID-12345 | John |
| PersonID-15635 | Susie |
| | |
| | |
| Desired Teams table after table transformation |
| Team | Persons nickname |
| TeamID-1 | John, Susie |
Thanks a lot if you can support with this.
Best regards,
Emil