Tree Query question

From: <kaboel_at_wau.mis.ah.nl>
Date: 1997/11/12
Message-ID: <EJJnEF.Boy_at_wau.mis.ah.nl>#1/1


Hi,

have you tried something like

select

     <parent>, 
     sum(<spent>)
from 
     <table>
connect by
     prior <job> = <parent>
start with
     <job> = 10
group by
     <parent>

Just substitute the column names. You will get an answer on the query although I'm not sure it's the one you want.

Cheers,

>
>Data look something like this.
>
>Job Parent Spent
>10 NULL 100 -- top level has NULL parent WBS 10
>20 10 500 -- child 10.20
>27 20 700 -- grandchild 10.20.27
>32 27 50 -- great grandchild 10.20.27.32
>21 20 200 -- a 2nd branch from job 20 10.20.21
>

Kaboel Karso Received on Wed Nov 12 1997 - 00:00:00 CET

Original text of this message