Filipe Ferminiano
Filipe Ferminiano

Reputation: 8791

MySQL import csv file separated by tabulation

I need to import a CSV file into a table named "coplaints". The file is separated by tabulation. I already tried this:

load data local infile 'C:/Users/rocket/Documents/filipe ferminiano/processos/segmentacao/912013/coplaint.csv' 
into table crm_base.coplaints fields terminated by ' ' enclosed by '"';

But it doesn't work.

Upvotes: 0

Views: 2187

Answers (1)

Tom
Tom

Reputation: 6663

You need to use \t as your field terminator for a tab separated file.

load data local infile 
'C:/Users/rocket/Documents/filipe ferminiano/processos/segmentacao/912013/coplaint.csv'
into table crm_base.coplaints fields terminated by '\t' enclosed by '"';

http://dev.mysql.com/doc/refman/5.1/en/load-data.html

Upvotes: 1

Related Questions