Home Forums SQL Server 7,2000 T-SQL Divide By Zero Error in WHERE Clause RE: Divide By Zero Error in WHERE Clause
Kenneth Wilhelmsson
SSC-Dedicated
Points: 30043
More actions
June 28, 2004 at 3:41 am
#512122
Ah, my bad.
Didn't read the question close enough...
In that case,
select CASE field2 WHEN 0 THEN 0
ELSE (field1 / field2) END
+ ( other calcs )
FROM ....
should do just as required..
/Kenneth