ACC1x: Importing Delimited Text Files Strips Off DecimalsLast reviewed: May 14, 1997Article ID: Q95446 |
The information in this article applies to:
SYMPTOMSYou import a delimited text file that contains numbers with decimal places, and the resulting table does not show the decimal places.
CAUSEWhen Microsoft Access creates the table, it looks at the first record in the file to decide which data type to assign to the field. If the first record contains a .00 decimal value in a field, Microsoft Access gives the field a Number, Long Integer data type. Then it strips all the decimal values when importing the file because the Number, Long Integer data type does not support decimal values.
RESOLUTIONThere are two workarounds. The first is to create a destination table that already has the fields defined. Choose Number, Double as the data type. It supports decimal places. When you import the text file, append it to the existing destination table rather than allowing Microsoft Access to create a new table. Alternatively, you can work around the problem by making sure the number fields in the first record do not contain .00 as decimal values.
STATUSMicrosoft has confirmed this to be a problem in Microsoft Access version 1.0. This problem was corrected in Microsoft Access version 1.1.
MORE INFORMATIONIf any of the fields in the first record contain numbers that have decimal values of .00, Microsoft Access strips the decimal places from all the records for the corresponding fields in the resulting table.
Steps to Reproduce Behavior
REFERENCESMicrosoft Access "User's Guide," version 1.0, Chapter 4, "Importing, Exporting, and Attaching," pages 72-78 |
Keywords : IsmTxtd kb3rdparty
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |