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 -> Connect by query returns infinite # or rows

Connect by query returns infinite # or rows

From: Triger <trewetuyt_at_mister.com>
Date: 14 Feb 2003 15:14:32 -0600
Message-ID: <3e4d5b91$0$2702$45beb828@newscene.com>

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

Original text of this message

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