Forum Stats

  • 3,824,920 Users
  • 2,260,440 Discussions
  • 7,896,348 Comments

Discussions

Divide by zero error encountered

User_AEU5M
User_AEU5M Member Posts: 5 Green Ribbon
edited Feb 18, 2022 6:14PM in MySQL Community Space

I keep getting this 'Divide by zero error encountered' error message, can someone please help me correct this?

Increase =

   CASE

     WHEN sp.AccessLevel = 1

      THEN NULL

     WHEN ps.LastAnnualizedPayRate = 0

      THEN 0

   WHEN ps.LastAnnualizingFactor = 0

    THEN 0

     ELSE CONVERT(decimal(12,2), ROUND((ps.PayRate - (ps.LastAnnualizedPayRate /

       ps.AnnualizingFactor)), 2))

   END,

Tagged:

Best Answer

Answers