Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: large tree

Re: large tree

From: Jusung Yang <JusungYang_at_yahoo.com>
Date: 7 Jun 2003 10:45:52 -0700
Message-ID: <130ba93a.0306070945.45718d73@posting.google.com>


christian.wiedemann_at_key-tec.de (christian wiedemann) wrote in message news:<cb92ccb8.0306061558.5b9ae678_at_posting.google.com>...
> hi all,
> i have an large tree like
> -node_0
> -node_0.1
> -node_0.1.1
> -node_0.1.1.1
> -node_0.1.2
> -node_0.1.2.1
> -thounsand other nodes with childs
>
> so what i want is to get the first 20 nodes under node_0.1 and their
> descendants orderd by an condition and restricted by an condition
>
> is there a way to do this?
>
> thanx
> christian

Assuming you are familiar with the ORACLE "connect by" clause, and you have the table/data designed to work with "connect by", it is just a matter of applying
the <start with>, <order by> and <where> clause at the right place. If I understand what you want correctly, you would just 1. Get all the child nodes under node_0.1 (since you want sorting) with <start with>
2. Apply restrictions to 1 with <where> and sort them with <order by> 3. select the first 20 nodes from 2 with ROWNUM <21

Received on Sat Jun 07 2003 - 12:45:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US