I have tabel with id(int) and parentid(int) column. I would like to build hierarchy from top group to lowest child group. Most top group parentid value is NULL How can I achieve this? result should be:
etc Data:
asked 19 Aug '13, 04:50 Tanel |
What SQL Anywhere version are you using? Starting with v9, a recursive common table expression is handy for such tasks - cf.
answered 19 Aug '13, 07:34 Volker Barth Yep- recursive union did the trick. Thx
(22 Aug '13, 03:50)
Tanel
|
See these articles... answered 19 Aug '13, 08:15 Breck Carter |