I don't think you did because if you had then what you would have seen would be as follows:
SQLite version 3.7.17 2013-06-05 16:17:21 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> CREATE TABLE QQQ([FIELD1] INTEGER, [FIELD2] TEXT); sqlite> .mode csv sqlite> .import csv.txt QQQ sqlite> select * from QQQ; FIELD1,FIELD2 1,ABC 2,BCD 3,CDE Which clearly indicates that there are 4 rows in table QQQQ and that the value of FIELD1 where field2='FIELD2' is 'FIELD1'. Of course, if you want column headers, then you see the same result: sqlite> .header on sqlite> select * from QQQ; FIELD1,FIELD2 FIELD1,FIELD2 1,ABC 2,BCD 3,CDE Or are you saying that you misinterpreted the first row of results from the select as column headers when they were not? I do not see how you could possibly obtain something that looks like: > > > Table will then be like this: > > > > > > FIELD1 FIELD2 > > > --------------------------------- > > > 0 FIELD2 > > > 1 ABC > > > 2 BCD > > > 3 CDE --- () ascii ribbon campaign against html e-mail /\ www.asciiribbon.org > -----Original Message----- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Bart Smissaert > Sent: Saturday, 08 June, 2013 10:52 > To: General Discussion of SQLite Database > Subject: Re: [sqlite] Strange table behaviour after text import with > sqlite3.exe > > Not sure what you are getting at now. > > > Select * from QQQ > > That is exactly what I did. > > It is all cleared up now in any case. > > > RBS > > > On Sat, Jun 8, 2013 at 4:56 PM, Keith Medcalf <kmedc...@dessus.com> wrote: > > > > Table will then be like this: > > > > > > FIELD1 FIELD2 > > > --------------------------------- > > > 0 FIELD2 > > > 1 ABC > > > 2 BCD > > > 3 CDE > > > > How did you arrive at this -- the table looks NOTHING like what you (I > can > > only assume) you ASSUMED it looks like. > > > > Instead of assuming what the table looks like, why not actually SEE what > > it looks like by executing: > > > > Select * from QQQ; > > > > The error of your untested assumption should then be clear ... > > > > --- > > () ascii ribbon campaign against html e-mail > > /\ www.asciiribbon.org > > > > > > > -----Original Message----- > > > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > > > boun...@sqlite.org] On Behalf Of Bart Smissaert > > > Sent: Saturday, 08 June, 2013 08:43 > > > To: General Discussion of SQLite Database > > > Subject: [sqlite] Strange table behaviour after text import with > > > sqlite3.exe > > > > > > Have table defined like this: > > > > > > CREATE TABLE QQQ([FIELD1] INTEGER, [FIELD2] TEXT) > > > > > > Table is empty, so has no records. > > > > > > Then I import a text file with this data: > > > > > > FIELD1,FIELD2 > > > 1,ABC > > > 2,BCD > > > 3,CDE > > > > > > This is via sqlite3.exe with: > > > > > > .mode csv > > > .import textfilename QQQ > > > > > > Table will then be like this: > > > > > > FIELD1 FIELD2 > > > --------------------------------- > > > 0 FIELD2 > > > 1 ABC > > > 2 BCD > > > 3 CDE > > > > > > This is all fine and as expected. > > > However I am unable to produce any records when doing a select > > > with a where clause specifying field1 to be zero. > > > > > > Tried all: > > > select * from qqq where field1 = 0 > > > select * from qqq where field1 = '0' > > > select * from qqq where field1 = '' > > > select * from qqq where field1 is null > > > > > > Nil producing a record. > > > > > > Any idea what is going on here or what I might be doing wrong? > > > > > > > > > RBS > > > _______________________________________________ > > > 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 > > > _______________________________________________ > 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