On c.Mundi's CSV inquiry,
  One way I (interactively) address the need to import CSV data into sqlite
databases is
to use Mrinal Kant's SQL Manager add-in. This offers what I believe are more
robust facilities for performing this type of bulk import. I'm not sure if
SQL Manager is an option for you, but give it a try if you can get by
without a strictly console level scripted solution.

joe

On Thu, Sep 24, 2009 at 2:12 PM, Simon Slavin
<slav...@hearsay.demon.co.uk>wrote:

>
> On 24 Sep 2009, at 8:37pm, C. Mundi wrote:
>
> > Happily, sqlite has a very nice .output mode for CSV.  It correctly
> > double-quotes fields when they contain a space or a comma, and it
> > correctly
> > 'escapes' double-quote literals as "".  Great!  I need to go the
> > other way.
> >
> > I don't see an inverse .import mode in sqlite to handle the completely
> > general CSV syntax.  As anyone who has ever tried knows, parsing
> > compliant
> > CSV is a lot harder than writing compliant CSV.
>
> Sorry, but you didn't miss anything, no such facility exists.
> The .import command does not handle quoted fields correctly, as has
> recently been stated on this list.  Some third-party tools do it fine
> but if you want to import your particular file you'll have to tweak
> your file so that whatever you're using as a separator never appears
> inside a field.
>
> Simon.
>
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>

Joe Glassy
Research Analyst/Programmer
University of Montana NSF EPSCoR Program
Davidson Honors College Room 013
Missoula, MT 59812
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to