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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Hierarchy -- walk up as well as down?

Re: Hierarchy -- walk up as well as down?

From: Phil Herring <revdoc_at_uow.edu.au>
Date: 19 May 1998 01:52:55 GMT
Message-ID: <6jqoln$2sd$1@wyrm.its.uow.edu.au>


In article <3560e1b0.32713289_at_news1.occa.home.net> JRStern, JRStern_at_primalsys.com writes:
>The start with / connect by prior works great, walking down the
>hierarchy. Is it possible to walk up a hierarchy -- given a node, to
>walk up and get all the parents? I mean, efficiently?

You do this by moving the "prior" keyword to the other column in your CONNECT BY. As for efficiency, that depends on your indexes... make sure that you have both parent and child columns indexed appropriately.



Copyright 1998 Phil Herring. This article may not be reproduced for profit.
Received on Mon May 18 1998 - 20:52:55 CDT

Original text of this message

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