Guys,
I have a column varchar(400) wherein currency_amount is stored. I need to sum currencyamount however getting the error like Arithmetic overflow error converting varchar to data type numeric.
Any suggestion? it has some values which are having 37 digits after decimal. Might be this is the possible reason.
Few Ex. .240189558129349189976534590012169112856, .312064488126471335301440042584800148951
This is the query i am trying
select sum(convert(decimal(38,20),columnname))
FROM tablename