How to rsum up totals from different columns and insert into one column
I have created a column to hold the total amounts for all amounts types recorded against an event.
the insert statements worked well for all the columns.
what i want to do is to rollup the total amounts for the 9 columns below and insert into the new column (CUST_TOTAL_AMT).
, CUST_TOTAL_AMT INTEGER
Below is sample of the insert statement that works well for the 9 columns above?
, CAST(S5IE.S5IE_ADJ_TOT_AMT AS DECIMAL(15,2))/100 AS ADJ_TOT_AMT
I am not sure if I understand it correctly. I think this is what you want:
(S5IE_ADJ_TOT_AMT+S5IE_DEDN_MAINT_EXPEND_AMT +S5IE_FGN_INC_AMT+S5IE_FRNG_BEN_AMT ........) as summing,
Please let me know if this is what you want.