A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Type Conversion Failure - importing text file



 
 
Thread Tools Display Modes
  #1  
Old July 6th, 2004, 07:12 PM
Sunriziz
external usenet poster
 
Posts: n/a
Default Type Conversion Failure - importing text file

I hope somebody can help. I am importing a text file into access as a table. I am using the "import text wizard". I click on the advance button and I've set up the import specifications by field. For this particular import I have approx 30 fields that are money amount fields and they are defined in the text file as PIC S9(16)V99. When I define them in the import specifications, I define as Long Interger with a field length of 19. By doing it this way, I am able to pull in the whole number without decimals. This is fine because then I create a query where I take that field and divide by 100 to get the decimals. The problem I am having is that on this one particular import I get 1 import error (type conversion failure) for one record. The field that failed to convert = 2191896752. Records above and below it all converted correctly. I can not figure out why only this one record failed to convert for this field. The only thing I can see is that this record has the longest amount of all the records. Does anybody have any idea's or thoughts?
  #2  
Old July 9th, 2004, 12:24 AM
Pieter Wijnen
external usenet poster
 
Posts: n/a
Default Type Conversion Failure - importing text file

simple
max long int is 2147483648 (if there'd only been an unsigned long int ....)
so your number is "to big" before it's divided ...

hth

Pieter

"Sunriziz" wrote in message
...
I hope somebody can help. I am importing a text file into access as a

table. I am using the "import text wizard". I click on the advance button
and I've set up the import specifications by field. For this particular
import I have approx 30 fields that are money amount fields and they are
defined in the text file as PIC S9(16)V99. When I define them in the import
specifications, I define as Long Interger with a field length of 19. By
doing it this way, I am able to pull in the whole number without decimals.
This is fine because then I create a query where I take that field and
divide by 100 to get the decimals. The problem I am having is that on this
one particular import I get 1 import error (type conversion failure) for one
record. The field that failed to convert = 2191896752. Records above and
below it all converted correctly. I can not figure out why only this one
record failed to convert for this field. The only thing I can see is that
this record has the longest amount of all the records. Does anybody have any
idea's or thoughts?


  #3  
Old July 9th, 2004, 12:24 AM
Pieter Wijnen
external usenet poster
 
Posts: n/a
Default Type Conversion Failure - importing text file

simple
max long int is 2147483648 (if there'd only been an unsigned long int ....)
so your number is "to big" before it's divided ...

hth

Pieter

"Sunriziz" wrote in message
...
I hope somebody can help. I am importing a text file into access as a

table. I am using the "import text wizard". I click on the advance button
and I've set up the import specifications by field. For this particular
import I have approx 30 fields that are money amount fields and they are
defined in the text file as PIC S9(16)V99. When I define them in the import
specifications, I define as Long Interger with a field length of 19. By
doing it this way, I am able to pull in the whole number without decimals.
This is fine because then I create a query where I take that field and
divide by 100 to get the decimals. The problem I am having is that on this
one particular import I get 1 import error (type conversion failure) for one
record. The field that failed to convert = 2191896752. Records above and
below it all converted correctly. I can not figure out why only this one
record failed to convert for this field. The only thing I can see is that
this record has the longest amount of all the records. Does anybody have any
idea's or thoughts?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Continual Error 1321 Trying to Install Office 2003 Chad Harris General Discussions 9 June 11th, 2004 08:19 AM
Default File Location Derek Ruesch Setting up and Configuration 6 January 30th, 2004 03:03 AM
MARCO TO Importing text file by specifying your columns nilaja Worksheet Functions 1 December 27th, 2003 02:48 PM


All times are GMT +1. The time now is 04:37 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.