I'm in a situation quite similar to MySql sql recursive loop, but the answer about adding a FullID column wouldn't be possible for me.
I've a table TREE of elements with a tree hierarchy :
ID NAME PARENT
1 a null
2 b null
3 c 1
4 d 3
5 e 2
6 f 4
7 g 3
How could I make a query that would return a result like that :
a - c - d - f
a - c - g
b - e
I tried with WHILE loops, creating queries and temporary tables dynamically, but it ended up being quite complicated and didn't worked.
chad an extra childgin addition tod?but the answer about adding a FullID column wouldn't be possible for mewhy?