I am trying to add together 2 fields in a SELECT statement, either of the 2 options works below until the situation arises where one field is NULL and the other contains 0.00 all that is returned at this point is ".00" without the leading 0. Any ideas why or how to work round?
Cheech
[Peace][Pipe]
Code:
ISNULL(CONVERT(DECIMAL(10,2), replace(NIV,',','')), 0) + ISNULL(CONVERT(DECIMAL(10,2), replace([NIV(Indirects)],',','')), 0) as NIVTotal
ISNULL(CAST(replace(NIV,',','')AS DECIMAL(10,2)), 0) + ISNULL(CAST(replace([NIV(Indirects)],',','')AS DECIMAL(10,2)), 0) AS NIVTotal
Cheech
[Peace][Pipe]