I have an update that does a table rollover for monthly buckets along with a yearly bucket column, I am having an issue updating the yearly, I want to have the yearly bucket updated with the monthly i.e.
update table set col1 = current, col_2 = col_1, col_3 = col_2, ...col_12=col_11, yearly_col = col_1 + col_2 + ...col_12
where something < current_date
the yearly_col doesn't update with the current values, suggestions on way to do this in same update statement?
anyone point me in the right direction?
update table set col1 = current, col_2 = col_1, col_3 = col_2, ...col_12=col_11, yearly_col = col_1 + col_2 + ...col_12
where something < current_date
the yearly_col doesn't update with the current values, suggestions on way to do this in same update statement?
anyone point me in the right direction?
Comment