On Mon, Jul 16, 2012 at 3:30 AM, YAN HONG YE <yanhong...@mpsa.com> wrote:
> the table is: > CREATE TABLE webinfo (inx INTEGER PRIMARY KEY ,website varchar(50) > UNIQUE,userna > me varchar(50),password varchar(50)); > > and the txt file kk.txt is utf8: > 0,nytime,gf,a1..7 > 1,bbc,1982,tbth432 > 2,oknic,y...@sohu.com,bbaa1122 > > when I use > " .import kk.txt webinfo" > in cmd line I got the error msg: > Error: datatype mismatch > ===================================== Hello, YAN HONG YE The default separator is a vertical bar (virgule, |) but I would think you'd get error: Error: kk.txt line 1: expected 4 columns of data but found 1 You are sure you get Error: datatype mismatch ? When I add, before the .import command, .separator , then I successfully imported your kk.txt when I tried this on versions 3.7.9 and 3.7.13 on Ubuntu. What version of sqlite3 and what operating system are you using? By the way, you may already know that your varchar(n) specs are pretty much comments and sqlite will simply set TEXT affinity, Donald _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users