| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Paul DuBois | Date: | September 23 1999 1:15am |
| Subject: | Re: importing text file with mysqlimport | ||
| View as plain text | |||
At 7:58 PM -0500 9/22/99, Martin Ramsch wrote: >On Wed, 1999-09-22 19:51:01 -0500, Paul DuBois wrote: >> >Not possible with mysqlimport as far as I know, but you always can use >> >LOAD DATA LOCAL INFILE directly. >> >> How would that help? mysqlimport --local is basically the same as >> LOAD DATA LOCAL INFILE. > >Yes, but with LOAD DATA one can specify fields! > > LOAD DATA LOCAL INFILE 'fielname' > INTO TABLE tablename > FIELDS TERMINATED BY ' ; ' > (col3, col6); From mysqlimport --help: --fields-terminated-by=... Fields in the textfile are terminated by ... --fields-enclosed-by=... Fields in the importfile are enclosed by ... --fields-optionally-enclosed-by=... Fields in the i.file are opt. enclosed by ... --fields-escaped-by=... Fields in the i.file are escaped by ... --lines-terminated-by=... Lines in the i.file are terminated by ... Am I missing something here? -- Paul DuBois, paul@stripped
