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

bug on CSV import

luc7v posted 10 months ago in General
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.
kalvaro posted 10 months ago
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
---------------------------

luc7v posted 10 months ago
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.