PHP Mysql SUM with decimal format -
i have table has column : balance_amount of type varchar
now i'm facing problem when want sum.
example:
if have content column :
125,000.00 170,000.00 it show : 295
what want : 295,000.00
here sqlfiddle
select format(sum(cast(replace(replace(col,',00',''),'.','') signed)), 2) sumofcolumn tab
Comments
Post a Comment