CrazyEngineers
  • Progress - Remove duplicates from a Temp-table

    Prashanth_p@cchi

    Prashanth_p@cchi

    @prashanth-p-at-cchi-rg0z63
    Updated: Oct 22, 2024
    Views: 944
    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
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Home Channels Search Login Register