3 Replies Latest reply: Aug 9, 2017 7:55 AM by Tina Leibundgut RSS

    More than one Selfjoin

    Tina Leibundgut

      Hi all,

       

      One table from a database, which has the parent in the same table. But a entry can have more than one parent. It's nowhere defined how many parents, but what I see, should there be not more than 15. How can I get the full path for each entry? At the end I should get for each entry the whole path.

       

      A example from the table

      IDpart of pathParent ID
      1root
      2fruits1
      3banana2
      4apple2
      5yellow3
      6vegetables1
      7potato6

       

      I need at the end

      IDfull path
      1root
      2root/fruits
      3root/fruits/banana
      4root/fruits/apple
      5root/fruits/banana/yellow
      6root/vegetables
      7root/vegetables/potato

       

      One self join is no problem, but this... I really need help.

       

      thanks in advance,

      Tina