Hey guys,
I am trying to achive the following:
Truncate the values 1680.390000000000000000
to numeric (6,3)
All works ok until i hit a value over 1000, (as above)
The code i was using is:
cos1 = 1680.390000000000000000000
CONVERT (NUMERIC(6 , 3), ROUND(COS1, 3))
I have tried a few others, but nothing seems to work..
I get the following error. "Arithmatic Overflow"
Has anyone got any suggestions?
Thanks guys,
Scotty
A numeric(6,3) would only accept a number as large as 999.999 -six digits total, three digits to the right of the decimal.
Your value, 1680.xxxx exceeds the maximum size and creates an overflow condition -resulting in an error.
Perhaps you need a larger number, like maybe, just guessing here, numeric(8,3)?
|||Brilliant!!!!
thanks vry much Archie.. this has been confusing me all day,, the way they explain it looks to me as 6 to the left, and 3 to the right...
Thanks again
Scotty
No comments:
Post a Comment