Home Forums SQL Server 2005 T-SQL (SS2K5) Division by zero on a SQL Instance while a different Instance run correctly RE: Division by zero on a SQL Instance while a different Instance run correctly

  • Hi John

    I think you got the target! 🙂

    A possible reason for this error is that the division expressions are being evaluated

    for some rows before those rows are excluded by the WHERE clause.

    I've searched in the table if there are rows where this field is Zero and, surprise surprise, there are some!!

    There should not be zero values there but there are !! :angry:

    A curiosity : In my case this strange behaviour helps to find a potential data issue but speaking in general term

    shouldn't it be considered an error of the DB Engine ?

    Many thanks for the kind help

    🙂