It appears that using equals on floating point (REAL) data in WHERE clauses
doesn't necessarily work, presumably because of rounding errors - see below
for an example.  Is this the case?  Do I need to use BETWEEN instead of =
as I expect to be the case?

Thanks,
Donald.

sqlite> select * from table2 where Id='METER' and Type=0 and Pointer=15 and
"Date"=30414.0 and "Time"=141954.0;

RowId|Id|Type|Pointer|Date|Time|3|4|etc

31|*METER*|*0*|*15*|*30414.0*|*141954.0*|*3.45000004768372*
|4.55999994277954|5.67000007629395|6.78999996185303|7.8899998664856|8
.89999961853027|9.01000022888184|10.1199998855591|11.2299995422363|12.3400001525879|13.4499998092651|14.5600004196167|15.6700000762939|1.0
32|*METER*|*0*|*15*|*30414.0*|*141954.0*|*3.45000004768372*
|4.55999994277954|5.67000007629395|6.78999996185303|7.8899998664856|8
.89999961853027|9.01000022888184|10.1199998855591|11.2299995422363|12.3400001525879|13.4499998092651|14.5600004196167|15.6700000762939|1.0
sqlite> select * from table2 where Id='METER' and Type=0 and Pointer=15 and
"Date"=30414.0 and "Time"=141954.0 and "3"=3.45000004768372;

<no rows returned>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to