I did try number literal >10 but mad no difference. I will rebuild the database row as an integer.
Lloyd
----- Original Message ----- From: "Igor Tandetnik" <[EMAIL PROTECTED]>
To: "SQLite" <sqlite-users@sqlite.org>
Sent: Thursday, October 26, 2006 12:21 AM
Subject: [sqlite] Re: number problem with 3.2.8


Lloyd Thomas
<lloydie-t-d/OCxD/[EMAIL PROTECTED]> wrote:
I am using sqlite 3.2.8 which is included in PHP5.1. I seem to be
having a problem doing queries where with '>' to search a number.
for instance if I do the following

select  ring_time fron calls where ring_time > '10';
I get the following results
3
6
3
6
3
6
2
3
3
3
2
etc.
Why?
This row is varchar. Is 3.2.8 not able to work with numbers stored as
varchar?

I don't see any problem. '3' is indeed greater than '10' in alphabetic order. What did you expect?

If you want the values to compare as numbers, why do you store them in a string field, and why do you compare against a string literal '10' rather than numeric literal 10 ?

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to