I have a varchar field that may be null that I need to get the value from and get the sum. I need to convert the value to a decimal in order to do this, but I keep getting the error 'Error converting data type varchar to numeric'.
SELECT isnull(sum(cast(isnull(ProductFields.Mobile_GPV,0) as decimal)),0)
FROM ProductFields
Any ideas what I am doing wrong here?
Cheers,
Mike
SELECT isnull(sum(cast(isnull(ProductFields.Mobile_GPV,0) as decimal)),0)
FROM ProductFields
Any ideas what I am doing wrong here?
Cheers,
Mike