| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Tree (forest) design
> > Can you prove that your steps actually work...
>
> with jointAncestors as (
> select ename, empno, mgr from emp e
> connect by prior mgr = empno
> start with ename = 'SMITH'
> intersect
> select ename, empno, mgr from emp e
> connect by prior mgr = empno
> start with ename = 'ADAMS'
> ) select ename from jointAncestors j0
> where not exists (select 0 from jointAncestors j1 where j0.empno=j1.mgr)
> returns 'JONES'
>
> I used example emp table from oracle sample schema, but this could obviously
> be done with other hierachical methods and/or the other table.
Sorry, but it won't work. You could prove me wrong by generating a report equivalent to that shown at www.xdb1.com/Example/Ex076.asp starting from the same normalized, null-less data. Received on Thu Mar 04 2004 - 12:48:30 CST
![]() |
![]() |