Re Database Toolbox: "Arithmetic overflow error converting numeric to data type numeric"
Afficher commentaires plus anciens
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!
Réponse acceptée
Plus de réponses (1)
Kaustubha Govind
le 15 Fév 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 commentaire
David Goldsmith
le 15 Fév 2012
Catégories
En savoir plus sur Data Type Conversion dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!