Hi Charles,
----- Original Message -----
From: "Charles Lewis" <[EMAIL PROTECTED]>
> I have the following command:
> mysqlimport -d -c, --columns=DATE,TIME,MSG --fields-terminated-by=,
> --fields-enclosed-by=, dbase c:\file.txt
> This reads the following from a text file:
> 26 Sep 2001, 05:42:24 : Text message to be read.
Of course the unix freaks are right about the abundance of nice tools there,
but this particular problem can be resolved quite easily on DOS/Windows too:
Load the text file into a text editor (DOS' EDIT.EXE will do) or any word
processor, and do a global search&replace as follows:
- Search for comma followed by space, replace with comma.
- Search for space colon space, replace with comma.
Save the text file (in case of a word processor, make sure it stays
plain text).
Now all your fields are separated with a , and you don't need to specify any
inclosure characterrs.
Regards,
Arjen.
--
MySQL Training Worldwide, http://www.mysql.com/training/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Arjen G. Lentz <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Technical Writer
/_/ /_/\_, /___/\___\_\___/ Brisbane, QLD Australia
<___/ www.mysql.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php