Re: Tree (forest) design

From: Neo <neo55592_at_hotmail.com>
Date: 4 Mar 2004 10:48:30 -0800
Message-ID: <4b45d3ad.0403041048.ce8056e_at_posting.google.com>


> > 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 - 19:48:30 CET

Original text of this message