Progress - Remove duplicates from a Temp-table

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

Replies

You are reading an archived discussion.

Related Posts

According to textual information this is Screen protector in liquid form. You need to apply on your gadget surface and takes 5 minute to settle to be usable as other...
Dear All, i want to know about the books that help me to prepare for various government exams through Computer Science Branch.The exams under this category may include BEL,BHEL,ONGC,,,etc if...
skeeting in the elexa event means( by playing a musical dance on some important topics that can make the people aware about the matter) like on tree plantation or for...
hello crazyengineers, i vivek mishra. i m doing b.tech from IDEAL INSTITUTE OF TECHNOLOGY GHAZIABAD.i m in b.tech 3rd year electronics communication branch.
what is output of this program and please explain in detail.. #include main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d----%d",*p,*q); }