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.