Hi,

In SQLite 3.x there is no equality between number and text representing
number like in PostgreSQL and Oracle - example:

sqlite> SELECT 1 WHERE 1='1';
(nothing)
sqlite>

postgresql> SELECT 1 WHERE 1='1';
t
postgresql>

oracle> SELECT 1 FROM dual WHERE 1='1';
1
oracle>

The problem I do have is that I have some code base with queries like:
  SELECT * FROM table GROUP BY field1 HAVING sum(field2) = ?
and sqlite3_bind_text() is used to bind the parameter. The result is always
empty (no rows returned).
When I use sqlite3_bind_int() everything is ok.

Is it a bug in SQLite or a design? Will it change in the future?

Regards,
Peter

Reply via email to