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: Fetching from a hierarchical data structure?

Re: Fetching from a hierarchical data structure?

From: John Russell <johnrussell10_at_home.com>
Date: Tue, 17 Apr 2001 10:29:14 GMT
Message-ID: <e56odtk3h47jf62blnaut162ush3meetgq@4ax.com>

On Tue, 10 Apr 2001 18:51:53 GMT, "Maury Markowitz" <maury_at_remove_this.sympatico.ca.invalid> wrote:

>"David Busby" <dbusby3_at_slb.com> wrote in message
>news:3AD2F00A.4B829E4_at_slb.com...
>> I would just use the hirarchy tables that are in Oracle 8i. If you need
 an
>> example let me know.
>
> We're going to be moving to Oracle (and thus the post there) but now we're
>on Sybase.
>
> However, in the interests of my future livelyhood, I would love to see
>some examples. I can find only the most basic references to CONNECT BY.
>
>Maury
>

Yes, it's not very prominently documented. Here are all the examples from the 8.1.7 docs:

http://tahiti.oracle.com/pls/tahiti/tahiti.drilldown?word=connect+by&book=&preference=Examples&expand_all=1

All the queries wind up looking pretty much the same though, you just need to know CONNECT BY, PRIOR, START WITH, and LEVEL...

select * from ... connect by prior pointer = pointee start with <predicate to find the place(s) to start walking the tree> where ... and level < <condition to find the min/max depth>

John

--
Got an Oracle database question?
Try the search engine for the database docs at:
http://tahiti.oracle.com/
Received on Tue Apr 17 2001 - 05:29:14 CDT

Original text of this message

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