Thanks for the quick reply.
> SELECT DISTINCT typeof(timestamp) FROM table1;
returned "integer". Now the integer is a 64-bit value. Does SQLite have
trouble with those?
Although it appears the above is not the problem, I am curious if SQlite
will ever store an integer as a string, if the column type is
explicitely created to be an integer?
Thanksm
Eno
[EMAIL PROTECTED] wrote:
Eno Thereska <[EMAIL PROTECTED]> wrote:
Hi,
I noticed the following strange problem when the expression to WHERE
contains clauses that refer to the same column. Here are three queries
and their output:
select count(*) from table1
where ((timestamp >13448180261410868) and (timestamp <= 13448182164507680));
output: 100
select count(*) from table1
where (timestamp<=13448180261410868);
output: 46
select count(*) from table1;
output: 100
Some of your timestamp values might be stored as strings
instead of numbers. A string always compares greater than
a number.
What does this show you:
SELECT DISTINCT typeof(timestamp) FROM table1;
If this is the problem, you can fix it quickly by doing:
UPDATE table1 SET timestamp=timestamp+0;
--
D. Richard Hipp <[EMAIL PROTECTED]>
--
Eno Thereska
-------------------------------------------------
Carnegie Mellon University
Parallel Data Laboratory
CIC Building Cube 2221-D
5000 Forbes Ave Pittsburgh, PA 15213
Tel: 412-268-5908