SQL Round function not working, any ideas?
rounding, sql, sql-server
Solution
instead of `ROUND(ISNULL(SUM(Price),0),2)` you could try `CAST(ISNULL(SUM(PRICE),0) AS DECIMAL (4,2))`
Problem
Here is the SELECT statement: ``` SELECT ROUND(ISNULL(SUM(Price),0),2) As TotalPrice FROM Inventory WHERE (DateAdded BETWEEN @StartDate AND @EndDate) ``` Any ideas of why it's not rounding to two decimal places?