For example, here's a sample (header + one line of data) that fails -- a lot more lines fail but I cut it down just to show the problem:

"Year","Debt","GDP1","GDP2","RGDP","dRGDP","Infl","debtgdp"
"1833","","49.3275923134","","118.3483703666","","",""

Then, doing
.sep ,
.import data tab

gives error(s).

Replacing double quotes with blanks lets it work. (Running on Win7, if it matters.)

Another less important issue, I think it should put NULLs instead of blanks for blank columns.

-----Original Message----- From: Richard Hipp
Sent: Wednesday, August 28, 2013 2:58 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] v3.8 .import misbehaves

On Wed, Aug 28, 2013 at 7:24 AM, <to...@acm.org> wrote:

When trying to load a data file with ,"", sequences (for empty field),
there are quote escape related errors.
Manually converting ,"", to ,, allows the file to be loaded.  According to
RFC4180, the double quote is an escaped quote if found inside a string.
 The leading quote should not be considered an escaped quote.  The ,"",
pattern is very common for denoting empty field.


Unable to reproduce the problem.  CSV import works according to RFC4180
when I try it.

--
D. Richard Hipp
d...@sqlite.org
_______________________________________________
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