Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Here is my problem.
I have hierarchy like this one
Wcontext | Wcontext1 | Wcontext2 | BASSINE_QTY | ParentName |
PROECH | TOUS | PROECH | 4 | TOUS |
PROOCC | TOUS | PROOCC | 6 | TOUS |
TOKEY | TOUS | TOKEY | 20 | TOUS |
TOUS | 70 |
I used the hirarchy function to create that hierarchy
I would like to sum at each level , the BASSINE_QTY of the level + the BASSINE_QTY of the parents.
With that result :
Wcontext | Wcontext1 | Wcontext2 | BASSINE_QTY | ParentName |
PROECH | TOUS | PROECH | 74 | TOUS |
PROOCC | TOUS | PROOCC | 76 | TOUS |
TOKEY | TOUS | TOKEY | 90 | TOUS |
TOUS | 70 |
Does anyone has any idea how to do it ?
Thanks
Philippe
Philippe,
One way might be to create a resident table based on the sum of BASSINE_QTY:
Load ParentName, sum(BASSINE_QTY) as ChildrenTotal
resident .... group by ParentName
then a couple of lookups to fetch this total of the children and add this to the BASSINE_QTY of the parent where len(ParentName) > 0
Regards,
Gordon
Philippe,
One way might be to create a resident table based on the sum of BASSINE_QTY:
Load ParentName, sum(BASSINE_QTY) as ChildrenTotal
resident .... group by ParentName
then a couple of lookups to fetch this total of the children and add this to the BASSINE_QTY of the parent where len(ParentName) > 0
Regards,
Gordon