MySQL Forums
Forum List  »  CSV Storage Engine

problem import data
Posted by: Gert V
Date: February 01, 2008 04:15PM

Hello

I also made a topic in the Newbie section, but until now nobody has give me the right solution.

I want to import data from a file (txt, csv, ...) into a mysql database. The table has several columns and one of them is a column of the datatype enum.

...

mysql> load data infile 'D:\\PRODUCT\\product2.csv'
-> into table PRODUCT
-> fields terminated by ';'
-> optionally enclosed by '"';
ERROR 1265 (01000): Data truncated for column 'Type' at row 1

example of csv-file:
000001;omschrijving1;19;7;7;"4"
000002;omschrijving2;19;8;7;"4"
000003;omschrijving3;19;9;21;"2"
000004;omschrijving4;19;9;7;"4"
000005;omschrijving5;19;7;9;"4"
000006;omschrijving6;19;7;11;"1"

Does somebody know a way to import a delimited file in a table with an enum-column?

Can someone give me an example of a working example?
Is it posssible to display an example of the flat file and the describe of the table and the executed command


Thx

Gert

Options: ReplyQuote


Subject
Views
Written By
Posted
problem import data
16251
February 01, 2008 04:15PM
7896
February 03, 2008 12:20AM
7293
February 03, 2008 02:33PM
7350
February 03, 2008 05:41PM
7496
February 04, 2008 12:51PM
6467
August 11, 2008 02:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.