Storing calculated values violates generally accepted practices plus you haven't provided enough information. If you are going to sum the records for a particular month, where are you going to store the sum? You said you want to update a column named "test" but where would that column be? And if you were thinking of storing it in the table where the detail data lives, what record did you want to update?
The best, most correct solution is to calculate the sums as you need them in queries and reports. That way you know they are always accurate and current.