Cause of arithmetic overflow error?

  • michael.leach2015 - Thursday, January 31, 2019 10:31 AM

    Sue_H - Thursday, January 31, 2019 9:45 AM

    I mixed them up when I posted and didn't make it clear enough on the truncation.
    I'm not sure it really matters if trying for the minimum - the storage is the same with precision 1-9. Which is why I would have just left it.

    Sue

    Ok.  Thank you.

    One last thought here...   I would use decimal(8,4) so that no matter what input values you get, the result is 100% accurate, and no truncation or rounding gets in the way.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)

  • Johnson Welch - Friday, February 1, 2019 10:54 PM

    The error comes when you are trying to convert numeric or decimal value into varchar data type and the length of this variable is not long enough to hold its decimal or numeric value. Make sure that the length of VARCHAR variable or column is long enough to hold the decimal or numeric value. Avoid this error by increasing the length of the VARCHAR variable

    Where am I attempting to convert numeric into a varchar data type?  Is this implicitly occurring at the PRINT statement?  Does PRINT assume you are outputting a varchar?

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply