Get SUM of VARCHAR values in SQL Server

Last Reply 4 months ago By dharmendr

Posted 4 months ago

Hi!

I want get sum of to varchar number. 

declare @sum char(9) = '33,87', @sm char(9) = '55,83'
select REPLACE((Convert(MONEY, @sum) + Convert(MONEY, @sm )),',','.')

Result: 89.7

This question does not have replies that have been liked.