Hi,
I have to find the parent, the child and associated Id with which it is grouped in a table.
For example:
ID / Parent ID / Relation1/0 / 02/1 / 13/ 4 / 14/0 / 35/3 / 3
6 / 2/ 2
If I were to input the relation level, Then I will need all the IDs at that level, and their respective parents and child until no more parents or children.
Ex: If Relation = 1 Then output:
ID / Parent / Primary ID
2 / 0 / 2
3 / 4 / 3
5 / 3 / 3
6 / 2 / 2
4 / 0 / 3
I am able to get all the IDs, the child and the parent. But I am not able to pull the primary association ID accurately.
Can anyone please help?
Thanks.