Thursday, November 17, 2005

Avoiding Divide by Zero within SQL...

SELECT
myval =
case
when [denominator calculation] IN (0, NULL) then 0
else [full calculation]
end
FROM [table]


Original link here

No comments:

Post a Comment