Quick Solution to zero division errors in SQL Server Stored Procedures

Source: Internet
Author: User
Any division operation in SQLServer will result in a division error. Refer to the stored procedure: DC_ProjCost_SelByProjID.

Any division operation on SQL Server will encounter a division by zero error. Refer to the stored procedure: DC_ProjCost_SelByProjID.

Any division operation on SQL Server will encounter a division by zero error.

Refer to the stored procedure: DC_ProjCost_SelByProjID. (Note: This is my own search, so I will not put this UP here)

Copy the following prevention to the stored procedure to avoid this error.

-- The following two lines are used to crack the zero division error. It is prohibited to interrupt the zero Division Error and make it null.

SET ANSI_WARNINGS off

Set arithabort off

,

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.