[Techtalk] mysqlimport importing problems

Glenda R. Snodgrass grs at theneteffect.com
Thu Nov 21 18:41:59 EST 2002

> > > cmoliver at www-rt:./mysqlimport --columns=AssetCatID,AssetCategory
> > > --fields-optionally-enclosed-by='"' -d -p CaseComputers 
> > > /home/cmoliver/CaseComputersImports/AssetCategories.csv
> > try changing 
> > 	--fields-optionally-enclosed-by='"' 
> > to 
> > 	--fields-enclosed-by="\""
> > 
> > -- 
> > Glenda R. Snodgrass
> > 
> Hrm.  Good thought, but it still didn't work.
> I think this probably has something to do with it:
> CaseComputers.AssetCategories: Records: 7  Deleted: 0  Skipped: 0
> Warnings: 14
> Does anyone know how I could view those Warnings and get a heads up on
> what's going on?

That's one of the Great Mysteries of the Universe. :))  According to the
online documentation at www.mysql.com, " The warnings are not stored
anywhere; the number of warnings can only be used as an indication if
everything went well. "  You can't read those Warnings, and I get them all
the time even on operations that worked perfectly fine.

Try leaving out the --columns=AssetCatID,AssetCategory since you only have
those two columns anyway, and adding --fields-terminated-by="," and see if
that works.

Like Linda, I prefer LOAD DATA LOCAL to mysqlimport, so I went to that 
page (http://www.mysql.com/doc/en/LOAD_DATA.html) and found this:  "LOAD 
DATA INFILE also generates warnings when there are too few or too many 
fields in the input row" which makes me think you have some extraneous 
characters in your input file maybe?  

Glenda R. Snodgrass

Before you begin, consider ... The Net Effect
(251) 433-0196

More information about the Techtalk mailing list