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: 8 Jun 2003 14:09:48 -0700
Message-ID: <130ba93a.0306081309.4bb2d7d2@posting.google.com>


Post your query that is getting you thousands of rows, so people may understand what might be wrong with what you are doing.

christian.wiedemann_at_key-tec.de (christian wiedemann) wrote in message news:<cb92ccb8.0306080911.9f21a15_at_posting.google.com>...
> Hi,
>
> i want to get the first 20 childs under node_0.1 and their children.
> so when i restrict the select with where I get all childs (thounds)
> instead of the childs of the selected childs
>
> thanks
> christian
>
> JusungYang_at_yahoo.com (Jusung Yang) wrote in message news:<130ba93a.0306070945.45718d73_at_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
> >
> >
> > - Jusung Yang
Received on Sun Jun 08 2003 - 16:09:48 CDT

Original text of this message

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