• Like the previous poster said, the best solution is to "armour plate" the divisions with nullif.

    As for the SET ARITHABORT and SET ANSI_WARNINGS, it sounds like you had them outside the stored procedure itself. ("GO" is a batch separator, so it can't be inside the stored procedure code itself)