Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Connect by query returns infinite # or rows
Using Oracle 8.1.6 on a Sun 10k machine running under Sun Unix 2.7
I have compoments that are connected in a hierarchal fashion and i wan to given a specifc node see all the nodes connected downstream of the node to it ('Tree Walking: All nodes top down ')
example.
transmission tranformer - com#34
|
transmission line #23
|
Large distributuion transformer #16
|
Large distr line #54
|
distri transformer #87
they are in a table as follows along with other components (see 3rd row)
from component to component status
51 11 11 82 34 23 23 16 16 54 54 87 99 21 71 12 61 66
when i do a connect by query
select from_component, to_component, status from table1 connect by prior to_component = from_Component start with to_Component = 23
I get the following
from component to component status 34 23 23 16 16 54 54 87 54 87 99 21 99 21 99 21 99 21 99 21 54 87 99 21 99 21 99 21 99 21
and so on for ever. What am i doing wrong?? Received on Fri Feb 14 2003 - 15:14:32 CST