Results 1 to 3 of 3

Thread: Divide by zero error encountered

  1. #1
    Join Date
    Feb 2022
    Posts
    2

    Divide by zero error encountered

    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,

  2. #2
    Join Date
    Nov 2020
    Posts
    35
    Correct it by not dividing by zero. You show division by ps.AnnualizingFactor. Where does this value come from? Why would it be 0?

  3. #3
    Join Date
    Feb 2022
    Posts
    2
    That worked, thanks for your help!!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •