question

IvanYorkishev-3230 avatar image
0 Votes"
IvanYorkishev-3230 asked IvanYorkishev-3230 commented

Issues with decimals when importing data from Access to SQL Server (Microsoft)

I have been having issues with this for a while. For example : I want to import the number 5.21 from an access text box to the SQL server. But everytime I try it converts the number to the closest value of it without the dot. (5.21 > 5 and 5.6 > 6)

This is my SQL config at the moment:
146750-screenshot-2021-11-05-092731.png
I have tried float,bigint,decimal,numeric for the field m4_width.

This is my Access:
146725-screenshot-2021-11-05-100618.png
I have tried to use General Number, fixed, no format and standart. I also have tried using 1,2 and none decimal places but with no avail.


sql-server-generaloffice-access-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

TiborKaraszi avatar image
0 Votes"
TiborKaraszi answered IvanYorkishev-3230 commented

And int in SQL Server is an integer, it has no decimals. Perhaps you should use the decumal(9,2) type (or whatever you want for scale and precision)? https://docs.microsoft.com/en-us/sql/t-sql/data-types/decimal-and-numeric-transact-sql?view=sql-server-ver15

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

As I have said, I have tried using decimals and other values. That did not help

0 Votes 0 ·

What precision and scale did you use, when you tried "decimals and other values"? If you for decimal don't specify the precision and scale, then you get 0 decimals. However, float, for instance, should give you decimals, regardless.

If you truly used a datatype which has decimals, then it isn't a SQL Server problem, and the question should be directed to an Access forum instead.

0 Votes 0 ·

It is both an SQL and Access problem. More like the communication between the two.
:D I have been directed to this forum from the Access forum. So I believe this post belongs in the two places

0 Votes 0 ·