Link to home
Start Free TrialLog in
Avatar of vsllc
vsllc

asked on

How do I fix divide by zero error message?

I'm using the following formula to create a new column and I'm getting an error message that says 'Divide by zero error encountered'.  How do i fix this?

cast((rate/quantity) as numeric (9,2)) PerRate

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hello vsllc,


case when quantity >o then cast((rate/quantity) as numeric (9,2))    else 0  end PerRate


GOD BLESS,

Aneesh R.
Avatar of vsllc
vsllc

ASKER

Thanks.