| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Tree (forest) design
> > PS. I am still awaiting your solution to the problem posted in the
> > "object algebra" thread.
>
> 0. Create hierarchy table with any known SQL-based method.
> 1. Select path to the root from node A ("Ancestors list" query).
> 2. Select path to the root from B.
> 3. Intersect 1 and 2.
> 4. Find the node most distant from the root in the result.
Another person (in this thread) also claimed he could do it it with a one-line query. Why does it take you 4 additional steps? Since neither actually produced a report I am not sure who to believe.
Can you prove that your steps actually work by producing a "Nearest Common Ancestor Report" equivalent to that shown at www.xdb1.com/Example/Ex076.asp starting from the same normalized, null-less data? Can you implement your steps using MS Access or SQL-Server so that we can verify it? Received on Wed Mar 03 2004 - 18:52:28 CST
![]() |
![]() |