Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: aggregation over two hierarchies
thanks for observation. Here is a more complex example of data in the
JOB table. Is this directed acyclic graph? Or cyclic as there is
closure between 12-10-5-9-11-12 nodes and 16-15-12-11-9-0-14-16?
http://img23.exs.cx/my.php?loc=img23&image=directedgraph11th.png
Each node must be visited and the value prorated in recursive fashion:
foreach node
-start with a node, for example 16
-visit each hierarchy on which 16 depends, in this case hierarchies for
14 and 15, SUM their values and the current value of node 16, and that
will be new, prorated value for node 16
-repeat this recursively for each sub-hierarchy
until all nodes are prorated
Received on Thu Feb 24 2005 - 05:33:55 CST