Hello, I have a strange issue with a seemingly simple query.
The table schema: CREATE TABLE ae_objects ( oid INTEGER PRIMARY KEY, name VARCHAR(64), template_id INTEGER, template_module_id INTEGER, pos_x FLOAT, pos_y FLOAT, pos_z FLOAT, facing FLOAT, sprite_id INTEGER, sprite_module_id INTEGER, save_id VARCHAR(16), save_type INTEGER ); Sequence of SQL statements executed: sqlite> select * from ae_objects; 40007|1000|1|0|3.43301269412041|12.4330126941204|0.0|0.0|11|0|165|2 sqlite> select * from ae_objects where save_id = 165; sqlite> select * from ae_objects where save_id = '165'; sqlite> select * from ae_objects where save_id like '165'; 40007|1000|1|0|3.43301269412041|12.4330126941204|0.0|0.0|11|0|165|2 sqlite> SELECT * FROM ae_objects WHERE save_id<166 and save_id>164; 40007|1000|1|0|3.43301269412041|12.4330126941204|0.0|0.0|11|0|165|2 Why does the "save_id = 165" fail to get any rows? I get zero rows when I attempt to find the row by exact match of the "save_id" column, but with a "like" or a "greater than 164 and less than 166" I get the one row I am looking for. This only seems happens when that particular column is varchar(16). I have gotten this behavior on windows and linux. Can provide a db file if that helps. ------------------- Sean Riley Lead Programmer, Areae Inc. "All problems in computer science can be solved by another level of indirection", Butler Lampson, 1972 _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users