bug: Import one-field csv file, right Quotation marks will insert into field.

[expired user #6899]'s profile image [expired user #6899] posted 12 years ago in Import/Export Permalink
mysql table:
create table tab (f varchar(60) not null default '');

import a csv file, contains:

"abcdefg"
"12345"
"001"
"110119"
"test foo"
"bar"
"egg"
"python"
"script"
"go aheard"

Logs in HeidiSQL out put window:
INSERT LOW_PRIORITY IGNORE INTO `digg`.`tab` (`f`) VALUES ('12345"'), ('001"'), ('110119"'), ('test foo"'), ('bar"'), ('egg"'), ('python"'), ('script"'), ('go aheard"');

kalvaro's profile image kalvaro posted 12 years ago Permalink
So you got extra trailing quotes?

I've not been able to reproduce it :-?
ansgar's profile image ansgar posted 12 years ago Permalink
The relevant question is: what did you enter in the four control characters boxes of the import dialog?
[expired user #6899]'s profile image [expired user #6899] posted 12 years ago Permalink
I have known, the Control characters boxes.
The one-field csv file is terminated by \r\n ,but I inputed \n for "Lines terminated by", so ,the right quotation marks was filed into the field.

Many Many Thanks!

Please login to leave a reply, or register at first.