"Divide by zero error encountered, the statement has been terminated"

Version 2

    If you are getting the above error when trying to save an incident there are two things that could cause it:


    1, There is a calculation on the window which is causing the error.


    2, There is a trigger which has been written, or, in the case of "tps_survey", been modified such that it divides by zero.



    If it is being caused by a calculation you have written then you have two options:  Remove the calculation from the window, or modify it so that it does not divide by zero.


    In the case of the tps_survey trigger, the "select @constant=" row has probably been set to 0.  Set this to an integer (1,2,3,4,5...) to select the frequency at which surveys are sent out, or disable the trigger if you don't want surveys to be sent out at all.