> There is a way to insert null values from a file without specifying it > in?
It's impossible when you use standard sqlite3 command line utility. In your particular case you have 2 options: either write your own application that will recognize some kind of value as null and insert it instead of plain text, or you can use temporary table like this: CREATE TABLE tmp (name text); Then import data (without first column) into it, then execute the following statement: insert into t (name) select name from tmp; Pavel On Fri, Apr 8, 2011 at 1:28 PM, craf <pyclut...@gmail.com> wrote: > Hi. > > I'm new to SQLite and I am looking for a way to insert null data from > txt file. > > My database is: > > CREATE TABLE t (id integer primary key autoincrement, > name text); > > The data in the file data.txt are: > > null,"Peter" > null,"Xavier" > > > The problem occurs when I import the data: > > sqlite>.separator ',' > sqlite>.import data.txt t > > The error that throws me is: > > "Error: datatype mismatch" > > It is due to null, but I tried to put as: > > "null","Peter" > 'null','Peter' > '','Peter' > ,'Peter' > > But none of these options recognizes me. > > There is a way to insert null values from a file without specifying it > in? > > Sorry for my English! > > Regards > > Cristian > > _______________________________________________ > 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