Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Divide by zero error encountered
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01240222
Message ID:
01240225
Views:
20
You can use CASE function to check for nSd=0 and return whatever value you want. For example
CASE WHEN nSd<>0 THEN (a.nResult - nMean) / nSd ELSE NULL END
>
>I have the following query that performs some statistical calculations:
>
<snip>
The problem is with the nSdi calculations. The formula for this field is (a.nResult - nMean) / nSd. When try the execute the query I am getting the Divide by zero error encountered error mesage.
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform