SCS1ST
asked on
Divide by zero error encountered
Working on an Access ADP with SQL backend. I've got this one Function that keeps giving me this error. "Divide by zero error encountered". This is the statement it gives me this error at:
CASE WHEN [todayconcpoured] > 0 THEN ((([todayconcpoured] / [todaytightconc]) - 1) * 100) ELSE 0 END
Both fields have 0's instead of nulls.
I have been researching this on EE and I have tried with no success :
CASE WHEN [todayconcpoured] > 0 THEN ((([todayconcpoured] / CASE WHEN [todaytightconc] IS NULL THEN 0 ELSE [todaytightconc] END) - 1) * 100) ELSE 0 END
Can someone help me with this please?
Thanks
SCS1ST
CASE WHEN [todayconcpoured] > 0 THEN ((([todayconcpoured] / [todaytightconc]) - 1) * 100) ELSE 0 END
Both fields have 0's instead of nulls.
I have been researching this on EE and I have tried with no success :
CASE WHEN [todayconcpoured] > 0 THEN ((([todayconcpoured] / CASE WHEN [todaytightconc] IS NULL THEN 0 ELSE [todaytightconc] END) - 1) * 100) ELSE 0 END
Can someone help me with this please?
Thanks
SCS1ST
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
AngelIII,
Worked beautifully, thanks.
Worked beautifully, thanks.
try that