473,508 Members | 4,753 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Importing Text Files


Hi,

I'm importing our DOS data base (Dataflex) to Mysql I have a table with
174,638 records that I convert into a tab delimetered Text file however,
Mysql only reads 87,035! I checked the text file & it apperars fine is there
any limitation?

Joel
Jul 20 '05 #1
2 2003
Joel wrote:
Hi,

I'm importing our DOS data base (Dataflex) to Mysql I have a table with
174,638 records that I convert into a tab delimetered Text file however,
Mysql only reads 87,035! I checked the text file & it apperars fine is there
any limitation?


How are you loading the data? The mysqlimport tool?

Have you confirmed that it's the first 87,035 records of input data that
are accepted, and the latter portion is what is missing? Or are the
missing records scattered through the original input data?

Are any of the records violating the structure of your MySQL table? For
instance, are any of the strings too long to fit in the VARCHAR fields
you've defined? Are there any other constraints that are being
violated? Any numeric values that don't work because they have
thousands separators, or decimal places on fields defined as integer?

In my experience, some RDBMS products silently fail in these sorts of
cases, instead of spitting out tens of thousands of individual error
messages.

Any duplicate values trying to be inserted into a field defined as a
PRIMARY or UNIQUE key? Try the data load on a similarly structured
table, but without constraints defined. If all the records are accepted
to this table, you're on the right track. Then try this query:
SELECT PrimaryKeyField, COUNT(*) FROM MyTable GROUP BY
PrimaryKeyField HAVING COUNT(*) > 1;
That'll show you the values that appear multiple times in the primary
key field.

If you can figure out some examples of records that weren't loaded, you
can try to figure out if there's a pattern for why they weren't loaded.
Perhaps you need to edit your table structure to permit longer
strings. Then try the import again. If a greater number of records
were accepted, but still not 100%, then you may need to change something
else.

Regards,
Bill K.
Jul 20 '05 #2
On Tue, 05 Oct 2004 15:49:14 GMT, in mailing.database.mysql "Joel"
<jo**@ecsnj.com> wrote:
|
| Hi,
|
| I'm importing our DOS data base (Dataflex) to Mysql I have a table with
| 174,638 records that I convert into a tab delimetered Text file however,
| Mysql only reads 87,035! I checked the text file & it apperars fine is there
| any limitation?


In addition to the excellent suggestions by Bill, I would create a
mirror of the table where the data is to be imported. I would then
remove any indexing, autonumbers etc. Import the data into the
mirrored table as see what happens.

If the data still stops at a particular record then there is a good
chance that an entry in the text file does not match the database
datatype.
---------------------------------------------------------------
jn****@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2014
by: Awah Teh | last post by:
I am working on a project that involves importing IIS Log files into a SQL Server database (and these logfiles are big --> Some up to 2GB in size). Up until now I thought that DTS or the BULK...
11
3379
by: Grim Reaper | last post by:
I am importing a .csv file into Access that has 37 fields. My problem is that sometimes the last field only has data at the end of the column (it looks like when you import a file into Access, for...
1
3650
by: sparks | last post by:
I have never done this and wanted to ask people who have what is the best way. One person said import it to excel, then import it into access table. but since this will be done a lot, I am...
14
1867
by: MLH | last post by:
GHudson has working procedures posted at http://www.access-programmers.co.uk/forums/showthread.php?t=66320 They work. Relationships, however, and some minor default settings are not preserved....
29
4178
by: Natan | last post by:
When you create and aspx page, this is generated by default: using System; using System.Collections; using System.Collections.Specialized; using System.Configuration; using System.Text; using...
5
3152
by: hharriel | last post by:
Hi, I am hoping someone can help me with an issue I am having with excel and ms access. I have collected data (which are in individual excel files) from 49 different school districts. All...
12
6185
by: JMO | last post by:
I can import a csv file with no problem. I can also add columns to the datagrid upon import. I want to be able to start importing at the 3rd row. This will pick up the headers necessary for the...
1
1979
by: Kosmos | last post by:
Hey guys, I'm fairly familiar with access by now, but I've never worked with importing text into an access database. I have some fairly large text files (lets say, for example, a folder of 20 text...
1
2245
by: gollumullog | last post by:
Good Day, I have been having this issue for quite a long time, and have yet to find an easy/elegant solution. I am trying to create tables in an Access database. I have these tables as CSV...
1
3209
by: aconti74 | last post by:
Hello I am new to vba programming/coding. I am writing a program that goes through a directory of text files and imports them into the database. The problem is eventually the database gets to big...
0
7228
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7128
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7332
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7502
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5635
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
426
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.