Hi all, new to the list and new to mySQL...

I've only been at it for a few days and am looking at importing text files to 
databases.
I'm having trouble with mysqlimport and would appreciate any help or solutions as to 
what I'm doing wrong - I'm sure its a dumb mistake!

I tried LOAD DATA INFILE and it worked fine. Here's the code I used for it:

LOAD DATA LOCAL INFILE 'master_name.txt'
INTO TABLE master_name
FIELDS TERMINATED BY ':::'
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'

This works fine. Every record is in the table and all the data is in there.


When I try the same thing with mysqlimport, the records are there but there's no data 
in any of the fields!
The code I used for it:

mysqlimport -L -h localhost -u supercontact -ppassword --fields-terminated-by=::: 
--fields-enclosed-by=\" --lines-terminated-by=\r\n contactDB master_name.txt

However, that whole command above won't fit on the DOS prompt in one go, so I have to 
enter most of the options in one command, then the remaining ones along with the db 
name and txt file in a second command - it seems to work as the records are still 
added but there's no data.
(On another note, is there a way to fit the command onto one line in the DOS prompt?)

Any help is greatly appreciated.
Thanks,


Neil Belch

Reply via email to