[DISCUSSION] Recursive/Hierarchical Select

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Mar 6 07:21:17 CST 2009


On 3/5/09 8:58 PM, "Bart Pietercil" <bart.pietercil at cognosis.be> wrote:

> 2) for selection of records from starting recid till specified level
> 
> 
> select * from T1 where (recid IN DESCENDANTS linkname OF (recid = 5) DOWN TO
> LEVEL 3 INCLUSIVE/EXCLUSIVE STARTLEVEL)
> 
> select * from T1 where (recid IN ASCENDANTS linkname OF (recid = 5) UP TO
> LEVEL 3 INCLUSIVE/EXCLUSIVE STARTLEVEL)
> 
> This selects all recid from starting recid all branches up to or down to the
> specified level and you can specify if you want the startinglevel inclusive or
> not.
> Startinglevel : it seems to me that there will be case where you want to
> exclude the starting level (since you already know this level (otherwise you
> could not give a startinglevel recid))

Well, up to now I think we always have think about EXCLUSION of start level.

    query: Parents of Bart
        should not return Bart himself.
        right ?

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list