I have the following table:
+-----------+------------+
| ChildCode | ParentCode |
+-----------+------------+
| AUSNZ | APACZ |
| EASIAZ | APACZ |
| SEASIAZ | APACZ |
| AUSTR | AUSNZ |
| NZ | AUSNZ |
| PACISZ | AUSNZ |
| TOGO | PACISZ |
+-----------+------------+
I would like to have all ChildCodes with the ParentCode APACZ
. However, the problem is that the ChildCode again can be a ParentCode (see AUSNZ
) - there are multiple layers. Anyone an idea how to get all ChildCodes/ParentCodes belonging to APACZ
, i.e. to get the entire list of Codes which have APACZ
as a root?
Thanks in advance!