Kevin - thanks. I've been experimenting - my code would also fail when, for
example, I spooled to a file called "c:\red.txt" where the \r was stripped
and used as an escape character.

Switching to linux notation even while on Windows - ".output c:/red.txt"
solved the problem !

Much appreciated.

On Sun, Aug 26, 2012 at 2:14 PM, Kevin Benson <kevin.m.ben...@gmail.com>wrote:

> On Sun, Aug 26, 2012 at 11:30 AM, Udi Karni <uka...@gmail.com> wrote:
>
> > The following scenario happens occasionally.
> >
> > At first the import fails on mismatched columns - as if the "end-of-line"
> > marker is off.
> >
> > You run it again right away and everything completes successfully.
> >
> > ?????????????????
> >
> > Is there some kind of tracing that can be turned on so that when this
> > happens we can gather some clues?
> >
> > As an aside - not a big deal - this is on Windows - the file
> specifications
> > in the ".import" and ".read" commands require 2 back slashes in the
> syntax
> > - can that be fixed?
> >
> > Thanks !
> >
>
> Perhaps
> http://www.sqlite.org/uri.html  3.1 The URI Path
> will help you
>
> --
>    --
>       --
>          --Ô¿Ô--
>         K e V i N
>
>
>
> >
> > Z:\>sqlite3 z:\xyz.db3
> > SQLite version 3.7.11 2012-03-20 11:35:50
> > Enter ".help" for instructions
> > Enter SQL statements terminated with a ";"
> > sqlite> pragma page_size=4096;
> > sqlite> pragma journal_mode=off;
> > off
> > sqlite> pragma temp_store=memory;
> > sqlite> .timer on
> > sqlite> .separator ','
> > sqlite> .read c:\\create_table\\create_table_xyz.sql
> > CPU Time: user 0.000000 sys 0.000000
> > sqlite> .import c:\\data_csv\\xyz.csv xyz
> > Error: c:\data_csv\xyz.csv line 12: expected 59 columns of data but found
> > 99
> > sqlite> select count (*) from xyz;
> > 0
> > CPU Time: user 0.000000 sys 0.000000
> > sqlite> .import c:\\data_csv\\xyz.csv xyz
> > sqlite> select count (*) from xyz;
> > 97744059
> _______________________________________________
> 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