• ziangij (8/23/2010)


    plz. refer http://technet.microsoft.com/en-us/library/ms175003.aspx

    for

    select ROUND(748.58, -3)

    result displayed is 1000.00

    but when i execute the same i get an error:

    An error occurred while executing batch. Error message is: Arithmetic Overflow.

    any suggestions plz. ?

    Something with your connection options maybe. Are you running the default settings?

    The 748.58 is treated by SQL as Numeric(5,2) so 1000 doesnt fit there. With every setting at the default however SQL allows this. Now i havent been able to replicate the error. But you can check out

    http://www.eggheadcafe.com/software/aspnet/36185242/simple-round-call-results-in-arithmetic-overflow.aspx

    and maybe get a tip or 2.