The column is a Varchar and this called C10 and users may put in Characters or special characters rather than a numeric or decimal amount, i.e 10.00 or 10 etc
Contents;
C.XYZ = 1000
C10 = ABC
NEW AMT = 1000
C.XYZ = 1000
C10 = ' '
NEW AMT = 1000
C.XYZ = 1000
C10 = -500
NEW AMT = 500
I don't want to exclude it if the value is a space or if a char i.e ABC
CASE ISNULL(C10,'')
WHEN '' THEN C.XYZ
ELSE
C.XYZ + CAST (C10 AS DECIMAL(14,4) )
END AS 'NEW_AMT' ,
I am getting Error converting data type nvarchar to numeric.
What do I need to include in the script