Gilles wrote: > At 02:27 04/02/2008 +0100, Gilles wrote: > >> Thanks for the tip, but I tried that too, with no success: >> > > I tried both: > > sqlite> .separator "\t" > sqlite> .import test.csv customer > test.csv line 1: expected 3 columns of data but found 4 > > sqlite> .separator '\t' > sqlite> .import test.csv customer > test.csv line 1: expected 3 columns of data but found 1 > > >
Well, obviously(?) you are closer to success with "\t" than with '\t'. You probably have an extra unseen TAB. It won't like that NULL. Here's what works for me: C:\junk>type barzot.tsv 1 bar zot 42 plugh xyzzy 666 far narkle ============= Yes, there are 2 TABs per line. C:\junk>sqlite3 SQLite version 3.3.6 Enter ".help" for instructions sqlite> CREATE TABLE customer (id INTEGER PRIMARY KEY AUTOINCREMENT, tel VARCHAR (32), name VARCHAR(255)); sqlite> .separator "\t" sqlite> .import barzot.tsv customer sqlite> select * from customer; 1 bar zot 42 plugh xyzzy 666 far narkle sqlite> .separator , sqlite> select * from customer; 1,bar,zot 42,plugh,xyzzy 666,far,narkle sqlite> .quit HTH, John _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users