Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Divide by zero error encountered
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01240222
Message ID:
01240225
Vues:
32
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform