If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Importing numbers from .txt with a comma
I'm trying to import data from a .txt file, but numbers with a comma in them
are causing trouble. - If I try to import the .txt file, using Long Integer as a type, I get import errors for those fields with a comma. - If I try to append to a table (using Number type) via a link (using Long Integer type), I get the dreaded "Numeric field overflow" message. How can I fix this? It doesn't matter to me whether the final result in these fields have the comma or not. I just need them to import properly, and I need to be able to perform calculations once they are in the table. THANKS!!!! -- GD |
#2
|
|||
|
|||
Importing numbers from .txt with a comma
What about using double instead of integer and CDbl([ImportData]) to convert
text? -- Build a little, test a little. "GD" wrote: I'm trying to import data from a .txt file, but numbers with a comma in them are causing trouble. - If I try to import the .txt file, using Long Integer as a type, I get import errors for those fields with a comma. - If I try to append to a table (using Number type) via a link (using Long Integer type), I get the dreaded "Numeric field overflow" message. How can I fix this? It doesn't matter to me whether the final result in these fields have the comma or not. I just need them to import properly, and I need to be able to perform calculations once they are in the table. THANKS!!!! -- GD |
#3
|
|||
|
|||
Importing numbers from .txt with a comma
On Wed, 19 Aug 2009 07:25:01 -0700, GD wrote:
I'm trying to import data from a .txt file, but numbers with a comma in them are causing trouble. - If I try to import the .txt file, using Long Integer as a type, I get import errors for those fields with a comma. Is the comma a decimal separator (European style, e.g. 350,25 is three hundred fifty and a quarter)? If so, Long Integer is the wrong datatype: an Integer is by definition a whole number. - If I try to append to a table (using Number type) via a link (using Long Integer type), I get the dreaded "Numeric field overflow" message. How can I fix this? It doesn't matter to me whether the final result in these fields have the comma or not. I just need them to import properly, and I need to be able to perform calculations once they are in the table. THANKS!!!! I suspect you just want to use a Currency datatype rather than Number (if four digits after the decimal is enough), or a Double if not. Perhaps you could post an example of the data and the desired result. -- John W. Vinson [MVP] |
Thread Tools | |
Display Modes | |
|
|