Scott is right in the myriads of combination in handling csv/text file.  Check 
out "Text File Reader for SQLite" at https://github.com/elau1004/TFR4SQLite/wiki


Hope it meet some or all the needs dealing with importing text file.  Since it 
is implemented as virtual table, one need to select the text and insert it into 
a table.  One can specify conversion so that you can define your own 
interpretation of "NULL".




-----Original Message-----
From: Scott Doctor <sc...@scottdoctor.com>
To: General Discussion of SQLite Database <sqlite-users at 
mailinglists.sqlite.org>
Sent: Thu, Jul 30, 2015 11:53 am
Subject: Re: [sqlite] CSV excel import



A trick that works great most of the time with ODS is when 
exporting to CSV
select the option to quote all fields. One 
problem with CSV is that many
exports quote strings but not 
numbers. If everything is quoted then it is much
simpler to 
process. But would need at least several options on the
import:

1)  what is the separator token (i.e. is it a comma, or a 
period,
or a semicolon,...)

2)  what is the decimal token (i.e. is it a period,
comma, 
other,...)

3)  Should quoted strings keep the quotes or strip the
quote 
characters during processing

4)  What is the escape sequence for
embedding a quote character 
within a quoted string

5)  using single or
double quote character as the quote token.

As you can see the number of
permutations grows very fast to 
accommodate the wide variety of ways common
programs handle CSV 
exports.

On 7/30/2015 11:28 AM, Bernardo Sulzbach
wrote:

 > I can remember two times when my life would have been easier if I

> could throw big .ods into sqlite3 dbs. So I would also like 
such a
 >
project.
 > _______________________________________________
 > sqlite-users
mailing list
 > sqlite-users at mailinglists.sqlite.org
 >

http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
 >

>


_______________________________________________
sqlite-users mailing
list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Reply via email to