PDA

View Full Version : mysql 5 - load data infile not working


Lamentations
02-03-2006, 12:14 AM
im using query browser to run this statement

LOAD DATA INFILE 'job_list_load.txt'
INTO TABLE job_list
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'


when i run this, i get lots of warnings/errors in in the result pane with the likes of :
"out of range value adjusted for column 'id' at row 1


the data goes into the table, but the columns dont contain the correct data. its almost as if my data file has some extra garbage in it, but i dont think so.

help ?

Lamentations
02-03-2006, 01:28 AM
I think my problem is in how im building my input file. also i noticed i have commas in my field values, so i changed the FIELDS TERMINATED BY ',' back to
FIELDS TERMINATED BY '\t' putting a tab between fields

arrrgh this is a pain. been a while since ive messed with mysql

also noticed now that the first field is not getting populated, as if the 2nd column in the data file isnt being read. still getting lots of warnings about "out of range value for column..."

Lamentations
02-03-2006, 01:44 AM
anyone got an example of using load data AND include a simple data file that has records with both numeric and character data