I used to use Navicat to import CSV files into MySQL.
Now I find that I can use either Navicat or the latest
phpMyAdmin upgrade, and one or the other usually
works, even when I'm battling collation errors.

But I'm stumped on a relatively large but simple
table. I wondered if I might make it work if I set my
my MySQL table a certain way.

I put a picture of my basic table structure online at 
http://www.geobop.org/dat1.gif The first six fields
were originally int(3). However, I made them int(3) so
I could insert 937937 in all the NULL cells. When that
didn't work, I tried another experiment, changing them
to VARCHAR and adding an "x" to the last cells in the
1st and 4th-6th fields.

http://www.geobop.org/dat3.gif is a picture of my csv
file, focusing on the bottom row. Adding an X to the
numerals in the bottom row yielded quotes around those
numerals, which I thought might help.

http://www.geobop.org/dat2.gif shows what I see after
I import the data nd browse my table. The 6th column, 
RemoteStatesReg, is almost always messed up,
displaying NULL and apparently pushing the data on the
right into the wrong field.

But if I import the data another way, data from
several fields are jumbled together in the last field.

When I import csv with phpMyAdmin, I first truncate
the table, then choose the following settings:

Fields Terminated - ,
Fields Enclosed - " (Optionally)

I leave "Fields Escaped By" and "Lines Terminated By"
blank. Would it help if I created an extra column,
inserted some unique symbol, like !!!, then chose
"Lines Terminated By !!!"? Actually, I'll just give it
a try. I'm just fishing for any tips anyone can offer
for getting this data onboard.

Thanks.



                
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to