Re Database Toolbox: "Arithmetic overflow error converting numeric to data type numeric"
Show older comments
Hi! I'm getting the follwoing trying to use update:
[Microsoft][ODBC SQL Server Driver][SQL Server]Arithmetic overflow error converting numeric to data type numeric.
Google-ing, I find that this error is typically returned when the input exceeds the precision and/or scale of the target, but, at least as far as I can see, this is not the case 'cause my target is type decimal(18,18), but my input has only 15 digits, 1 to the left of and 14 to the right of the decimal place. Any ideas? Thanks!
Accepted Answer
More Answers (1)
Kaustubha Govind
on 15 Feb 2012
0 votes
I don't know anything about SQL, but doesn't decimal(18,18) mean that you can have zero digits before the decimal point, and 18 digits after the decimal point? In other words, you can only store values between 0 and 1e-18. I think your format needs to be at least decimal(18, 17) to store a number that has 1 to the left of and 14 to the right of the decimal place.
1 Comment
David Goldsmith
on 15 Feb 2012
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!