Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> [Q]How can I sum up the amount in hierarical data?

[Q]How can I sum up the amount in hierarical data?

From: Shadow Knight <yuanfu_at_ms1.hinet.net>
Date: 1998/01/18
Message-ID: <69vpih$5m4@netnews.hinet.net>#1/1

[Q]How can I sum up the amount in hierarical data? There is an organization tree like this
DEPT000
- DEPT100
-DEPT110 300
-DEPT120 250
-DEPT130 120

- DEPT200
-DEPT21O 100
-DEPT220 210

- DEPT300
-DEPT310 310
-DEPT320 150

I want to sum up the cost of each department to it's parent department like
DEPT000 1440 <---
- DEPT100 670 <---
-DEPT110 300
-DEPT120 250
-DEPT130 120

- DEPT200 310 <---
-DEPT21O 100
-DEPT220 210

- DEPT300 460 <---
-DEPT310 310
-DEPT320 150

Can I use Hierarchical query to do that? What SQL statement should I use? Thanks for your help.
yuanfu_at_iname.com Received on Sun Jan 18 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US