distal-attribute
distal-attribute
distal-attribute
distal-attribute

bug on CSV import

User, date Message
Written by luc7v
5 months ago
Category: General
5 posts since Sun, 02 Mar 14
I have a CSV with missing values, like this:

A,B,C
D,E
F,G,H

HeidiSQL imports it like this:

A,B,C
D,EF,G

This makes no sense. I think it's more useful to split lines BEFORE fields, so the missing values to be the defaults.
Written by kalvaro
5 months ago
587 posts since Thu, 29 Nov 07
I cannot reproduce. I've created this table to test:

create table foo (
a varchar(50),
b varchar(50),
c varchar(50)
);



... and I'm getting this with your data:

---------------------------
Error
---------------------------
SQL Error (1261): Row 2 doesn't contain data for all columns
---------------------------
OK
---------------------------

Written by luc7v
5 months ago
5 posts since Sun, 02 Mar 14
I use
Client parses file content

Unfortunately, I can't provide the real data.

But it seems HeidiSQL just takes values until every field is filled, even if it encounters the record delimiter. I think the file should be split in records (lines), and just then every record in fields.
 

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