denny simon

denny simon

  • NA
  • 57
  • 0

to summarize a table

Mar 13 2010 4:23 AM

hello all

I have a table ,created in memory  as below:

how to sumarize this table ,so it merge (sum) the value in column where ever the year and the month are same.
Here I show the table after summarized also

//----------------------before

           year      Month      Val1             Val2             val3          Val4

           2009     11            900000       0                  0               0
           2009     11            0                 700000        0               0
           2010     3              6100000     0                  0               0
           2010     3              0                 7500000      0               0
           2010     3              0                 0                  900000     0
           2010     3              0                 0                  0               0

//------------------------after

           year      Month      Val1             Val2             val3          Val4

           2009     11            900000       700000        0               0
           2010     3              6100000     7500000      900000     0
        

Answers (1)