--- Witold Czarnecki <[EMAIL PROTECTED]> wrote: > SELECT TYPEOF(ROUND(1)); > ... returns 'text'. Is it OK? Sorry, I asked this question 2 days ago > but I still don't know - is it a bug or not?
yes but there's a fix checked in > 2. > sqlite> CREATE TABLE test(id INTEGER NOT NULL PRIMARY KEY UNIQUE, fld > > INTEGER); > sqlite> INSERT INTO test(fld) VALUES(1); > sqlite> INSERT INTO test(fld) VALUES(2); > sqlite> SELECT * FROM test; > 1|1 > 2|2 > sqlite> SELECT * FROM test WHERE id < '2'; > 1|1 > 2|2 > sqlite> SELECT * FROM test WHERE fld < '2'; > 1|1 > > ... why fields id and fld behave different? Both are integers. There's a problem with the conversion from text to integer I think. If you remove the conversion it works: D:\temp\convention>sqlite3 test.db SQLite version 3.0.8 Enter ".help" for instructions sqlite> CREATE TABLE test(id INTEGER NOT NULL PRIMARY KEY UNIQUE, fld ...> INTEGER); sqlite> INSERT INTO test(fld) VALUES(1); sqlite> INSERT INTO test(fld) VALUES(2); sqlite> SELECT * FROM test; 1|1 2|2 sqlite> SELECT * FROM test WHERE id < 2; 1|1 sqlite> SELECT * FROM test WHERE fld < 2; 1|1 sqlite> note there are no quotes around the 2. __________________________________ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. http://info.mail.yahoo.com/mail_250