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 -> Re: Can this be done in SQL? Find the transitive relation

Re: Can this be done in SQL? Find the transitive relation

From: Vadim Tropashko <vadimtro_invalid_at_yahoo.com>
Date: Fri, 10 Aug 2007 15:27:50 -0700
Message-ID: <1186784870.559258.286870@d30g2000prg.googlegroups.com>


On Aug 10, 3:18 pm, Vadim Tropashko <vadimtro_inva..._at_yahoo.com> wrote:
> On Aug 4, 12:06 pm, "da. Ram" <dba2..._at_yahoo.com> wrote:
> > Dear Group,
>
> > I am strugling get the following done in SQL. Could anyone help me to
> > figure out a way?
>
> > Oracle version 8i .

As I mentioned in the "canned answer" the problem reduces to being able to find a transitive closure of the query. Transitive closure in 10g is

select connect_by_root(head), tail
from Edges
connect by prior head = tail

As you see you need "connect_by_root". Alternatively, you can parse sys_connect_by_path which is available since 9i. I'm afraid your query can't be solved in 8i. Received on Fri Aug 10 2007 - 17:27:50 CDT

Original text of this message

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