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 -> SQL Query Treewalk Teaser

SQL Query Treewalk Teaser

From: Mike Cretan <mcretan_at_ozemail.com.au>
Date: Mon, 29 Apr 2002 15:30:59 +1000
Message-ID: <JS4z8.36$HM.31016@vicpull1.telstra.net>


Hi Folks,

DB 8.1.7 on NT

I'm no newbie, but I'm having some issues figuring out which way to go about this one, and I'd appreciate some help...

I have a table structure as follows:

    .---------.
    | Identity |
    '---------'

        |      |
       n     n

 .--------------.
 | Relationship |
 '--------------'

i.e an identity can be related to many other identities, which can in turn be related to many other identities.

The relationship is not strictly hierarchical like the old emp manager example.

What I would like to get is the entire set of identities that have any relationships given a starting identity?

With Oracle, how can I tree walk the entire set of relationships and list the identities. I don't care about the level, just the related identities.

Many thanks in advance,

Mike Cretan Received on Mon Apr 29 2002 - 00:30:59 CDT

Original text of this message

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