Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Question on Hierarchy
ronnie_yours_at_yahoo.com (Ronnie) wrote in message news:<ea603f8d.0308191244.a771d15_at_posting.google.com>...
> Please suggest
How's this:
SQL> desc zot
Name Null? Type ------------------------------ -------- ------------------------ F1 VARCHAR2(1) F2 VARCHAR2(1) F3 DATE
SQL> select * from zot
2 ;
Press Return to continue...
F F F3
- - -------------------- a b 2003-Aug-20 16:11:13 b c 2003-Aug-20 16:11:22 c d 2003-Aug-20 16:11:32
Elapsed: 00:00:00.50
SQL> select
2 nvl((select 'Y' from dual where exists
3 (select 1 from zot 4 where f2 = 'd' 5 connect by prior f2 = f1 6 start with f1 = 'a')),'N')
N
-
Y
Elapsed: 00:00:00.18
SQL> select
2 nvl((select 'Y' from dual where exists
3 (select 1 from zot 4 where f2 = 'd' 5 connect by prior f2 = f1 6 start with f1 = 'e')),'N')
N
-
N
Elapsed: 00:00:00.28
HTH
Cheers
Nuno Souto
wizofoz2k_at_yahoo.com.au.nospam
Received on Wed Aug 20 2003 - 01:42:39 CDT