Hello,
I doesn't fail for me (it may depend on the constraints on the target
table) but the behaviour is unexpected:

$ echo "1|test
> " > empty.csv
$ sqlite3
SQLite version 3.8.4.3 2014-04-03 16:53:12
sqlite> create table test(opt text, data text not null);
sqlite> .import empty.csv test
empty.csv:2: expected 2 columns but found 1 - filling the rest with NULL
sqlite> select * from test;
1|test
|test

As the bindings are not cleared, it is not a null value but the
previous bound value which is inserted.
Regards.

On Mon, Jun 2, 2014 at 5:41 PM, Gert Van Assche <ger...@gmail.com> wrote:
> All,
>
> I received 100.000 UTF-8 files (average size 50kb)  "ready for import" in
> an SQLite db.
> 90% of them go fine, but some files have an empty line at the very end of
> the fine (so an extra EOL before the EOF).
>
> Of course, the import fails... Is there an easy way to get rid of that
> extra empty line before I import the file, or is there a way to ignore an
> empty line?
>
> thanks
>
> Gert
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to