Hot answers tagged arithmetic-abort
3
The problem is in the expression:
ActualCommission =
CASE
WHEN ISNULL(sb.CommissionPercent, 0) = 0
THEN CAST(((sm.MarkupPercent - 100) / sm.MarkupPercent) * 100 AS decimal(18, 2))
ELSE ROUND(ISNULL(sb.CommissionPercent, 0) - (100.0 - sm.MarkupPercent), 2)
END
A divide-by-zero error could occur for any row where ...
Only top voted, non community-wiki answers of a minimum length are eligible