I have an attribute of a table named ad Latitude, i have set its data type
as decimal(9,8) null
but when i try to insert the value 33.42922222
it gives me the error
Parameter value '33.42922222' is out of range.
when i try to directly enter the value in the database table it gives the Arithmetic overflow error
i have tried to change the datatype to numeric(9,8) null
but to no avail
please help me find out the problem ...
For clarification DECIMAL(9,8)
is 1 digit before the decimal point and 8 digits after the decimal point.
So DECIMAL(10,8)
should work for 33.42922222
.
decimal and numeric (Transact-SQL)
Your precision is not enough. Set precision according to the maximum value which you except. For example, if you expect 999,999 as the maximum value and you need a scale of 8, set it as decimal(14,8).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With