Eggert, Henri wrote:

Hi,

I want to select the records which have both columns Text and Comming empty.

I have found that the problem is the column name "Text".
If I replace the column name "Text" by another all works fine.
So I wonder : is "Text" a keyword for sqlite ?


Henri,

The rules regarding the use of keywords as identifiers are discussed at http://www.sqlite.org/lang_keywords.html. The word "text" is recognized as a data type by sqlite but it is not a keyword. It can safely be used as a column identifier without quoting as shown below using the sqlite3 shell:

sqlite> create table t4(id integer primary key, text text, other text);
sqlite> insert into t4 values(NULL, 'a', 'b');
sqlite> insert into t4 values(NULL, 'c', '');
sqlite> insert into t4 values(NULL, '', 'd');
sqlite> insert into t4 values(NULL, '', '');
sqlite> select * from t4;
id          text        other
----------  ----------  ----------
1           a           b
2           c
3                       d
4
sqlite> select * from t4 where text = '' and other = '';
id          text        other
----------  ----------  ----------
4
sqlite>

Are you using a wrapper or some other interface to access sqlite?

HTH
Dennis Cote

Reply via email to