On Monday 06 August 2018 19:16:53 mohamed hamza wrote:
> I think  we can do more with recursive query like:
>
> with recursive CTE (nKey,caption ,nkeyp)  AS (
> select id,name,pid FROM persons WHERE pid=:n
>    union all
>    select id,name,pid from persons
>    join CTE t
>    on t.nKey= persons.pid)
> select * from cte ;
>
AFAIK nested sets have a better performance for reading the tree.

> this sql statement  is  inserted to tsqlresult.sql .
> I think that the procedure addchildren in mseuniverse example  is no longer
> valid?
>
Correct, the order of the returned records and the returned values should 
suffice to build the tree data.
How big is your tree? Is the data mostly static? 

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to