Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Question on Hierarchy
Hi,
I have a table which has data on father and sons
SQL> desc father_sons
Name Null? Type
----------------------------------------- -------- ------------FATHER VARCHAR2(1)
SQL> select * from father_sons;
F S
- -
a b
b c
c d
where b is the son of a
c is the son of b
d is the son of c
Lets say I were given "a" and "d" and asked to find out whether they are related or not. In this case they are.
How do i write a query which just gives me true or false on whether they are related or not.
Please suggest
Thanks
Ron
Received on Tue Aug 19 2003 - 15:44:56 CDT