ISNULL(SUM(MyTable.Total), 0) AS Total
How can I modify the above statement to also check if Total is less than 0 (zero), such that If Total is NULL or less than 0 (negative), I assign 0 to Total
CASE WHEN ISNULL(SUM(MyTable.Total), 0) <= 0 THEN 0
ELSE SUM(MyTable.Total)
END AS Total
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With