luvtitans50
MIS
I have the below Case statement that is giving me a "Divide by zero error"
CASE WHEN sum(p2.TempsonStreet) > 0 THEN MIN(ISNULL(p2.AvgBillRate,0) / p2.TempsonStreet) ELSE 0.00 END
However I can correct the error by doing this:
CASE WHEN sum(p2.TempsonStreet) > 0 THEN MIN(ISNULL(p2.AvgBillRate,0)) / sum(p2.TempsonStreet) ELSE 0.00 END
It doesn't give me the correct results?
CASE WHEN sum(p2.TempsonStreet) > 0 THEN MIN(ISNULL(p2.AvgBillRate,0) / p2.TempsonStreet) ELSE 0.00 END
However I can correct the error by doing this:
CASE WHEN sum(p2.TempsonStreet) > 0 THEN MIN(ISNULL(p2.AvgBillRate,0)) / sum(p2.TempsonStreet) ELSE 0.00 END
It doesn't give me the correct results?