Can anyone please help me out with the below scenario.
Def temp-table tt-temp
field a as int
field b as int
field c as int
field dt as date.
Consider the below records in the above TT.
Initial records.
a b c dt
99 5 10 4/12/2012
100 6 12 5/12/2012
100 6 14 6/12/2012
100 6 10 7/12/2012
101 7 16 8/12/2012
What can i do, so that i end up having the records as below i.e., If there are two/more records having similar values in the fields 'a' and 'b', then it should be merged to a single record where a and b will remain the same c will be added up (in the above case c should be 12+14+10 = 36).
Final record list.
a b c dt
99 5 10 4/12/2012
100 6 36 7/12/2012
101 7 16 8/12/2012.
Please let me know if i have to furnish anymore details.
Thanks in advance.
Progress version - 10.2b
Def temp-table tt-temp
field a as int
field b as int
field c as int
field dt as date.
Consider the below records in the above TT.
Initial records.
a b c dt
99 5 10 4/12/2012
100 6 12 5/12/2012
100 6 14 6/12/2012
100 6 10 7/12/2012
101 7 16 8/12/2012
What can i do, so that i end up having the records as below i.e., If there are two/more records having similar values in the fields 'a' and 'b', then it should be merged to a single record where a and b will remain the same c will be added up (in the above case c should be 12+14+10 = 36).
Final record list.
a b c dt
99 5 10 4/12/2012
100 6 36 7/12/2012
101 7 16 8/12/2012.
Please let me know if i have to furnish anymore details.
Thanks in advance.
Progress version - 10.2b