Results 1 to 6 of 6
  1. #1
    unixhd is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2021
    Posts
    6

    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.6 > 6)
    This is my SQL config at the moment:
    Click image for larger version. 

Name:	Screenshot 2021-11-05 092731.png 
Views:	10 
Size:	4.3 KB 
ID:	46542
    I have tried float,bigint,decimal,numeric for the field m4_width.


    This is my Access:
    Click image for larger version. 

Name:	Screenshot 2021-11-05 092718.png 
Views:	10 
Size:	30.4 KB 
ID:	46543
    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.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    make sure your access import field is set to SINGLE or double or currency,
    NOT INTEGER , nor LONG as these will remove the decimal.

    sql fields uses integers as SMALL INT, or INT.

  3. #3
    unixhd is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2021
    Posts
    6
    Tried, did not fix the issue

  4. #4
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,157
    Your data in SQL is an integer data type, it can only store an integer value.
    You need to use a decimal data type in SQL server.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

  5. #5
    unixhd is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2021
    Posts
    6
    I have also tried decimal values as I said

  6. #6
    Minty is offline VIP
    Windows 10 Office 365
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,157
    You would have to change the datatype in SQL server , save the table design then re-import .
    I would use Decimal (18,4) for most values unless you need a large degree of accuracy after the decimal point.

    Int & Big Int definitely won't work.
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 07-25-2019, 12:33 PM
  2. Importing Decimals to Access
    By afa in forum Access
    Replies: 2
    Last Post: 10-09-2017, 12:48 PM
  3. Importing Information From Microsoft Word to Microsoft Access
    By Runlynch in forum Import/Export Data
    Replies: 9
    Last Post: 01-17-2016, 06:21 PM
  4. Replies: 3
    Last Post: 10-04-2012, 11:38 AM
  5. Replies: 1
    Last Post: 09-13-2011, 01:52 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums