SQL Divide by Zero Fix
Topic
#72 by mreschke on 2008-05-30 10:11:25 (viewed 2,072 times)
There are three ways to avoid the "Division by zero encountered" error in your SELECT statement and these are as follows:
- CASE statement
- NULLIF/ISNULL functions
- SET ARITHABORT OFF and SET ANSI_WARNINGS OFF
Case Statement[++]
NULLIF and ISNULL[++]
ARITHABORT and ANSI_WARNINGS[++]
Recources [++]