Re: Import Access Tables
I am now trying to load a csv file into my MySQL table and I am getting errors and I cant figure out why…
The data comes into the table but it is truncated…I only get every other line…..
9 fields in the table and 9 columns in the CSV file.
Any thoughts to what is going on?
In the table in MySQL: In the last field has the first attribute of line 2 tacked onto the end. So it skipas that line and then goe sto the next. So I get every other line.
First line is 9876543211
Then the second line is 9876543213
The 9876543212 is at the end of line 1
Result in the MySQL table...
| is denoting field seperators they are not in the table
9876543211 | CA | Car Accident | 234 | Merrimac | 96th Place | Car Accident | 2008-05-04 04:30:00 | 1234567891 9876543212
9876543213 | CAI | Car | Accident | 6541 | 67th | Place Weber Rd | Car Accident 2008-05-04 04:30:00 | 1234567891 9876543214
Load Data:
load data local infile 'F:/TEMP/incident_case.csv' into table coordinates_database.incident_case fields terminated by ',' enclosed by '"' lines terminated by '\n';
Error:
Row 1 was truncated; it contained more data than there were input colums.
Row 2 was truncated; it contained more data than there were input colums.
Row 3 was truncated; it contained more data than there were input colums.
Row 4 was truncated; it contained more data than there were input colums.
Etc
CSV file:
"9876543211","CA","Car Accident","234","Merrimac","96th Place","Car Accident","2008-05-04 04:30:00","1234567891"
"9876543212","CAI","Car Accident Injuries","6541","67th Place ","Weber Rd","Car Accident injuries reported","2008-05-04 04:30:00","1234567891"
"9876543213","CAI","Car Accident Injuries","32","67th Place ","Weber Rd","Car Accident injuries reported","2008-05-04 04:30:00","1234567891"
"9876543214","CA","Car Accident","54","Stordon Ln","Weber Rd","Car Accident","2008-05-04 04:30:00","1234567892"
"9876543215","CA","Car Accident","6541","McDonlad Rd","Weber Rd","Car Accident","2008-05-04 04:30:00","1234567892"
"9876543216","CA","Car Accident","10251","Adnerson Ln","Weber Rd","Car Accident","2008-05-04 04:30:00","1234567892"
"9876543217","CAI","Car Accident Injuries","15640","Rancor Ave","54th St NE","Car Accident injuries reported","2008-05-04 04:30:00","1234567892"
"9876543228","CA","Car Accident","1021","Londerfon Rd","96th Pl NE","Car Accident","2008-05-04 04:30:00","1234567893"