Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Fetching from a hierarchical data structure?
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:
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
![]() |
![]() |