Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Can this be done in SQL? Find the transitive relation
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
![]() |
![]() |