Re: [sqlite] Wierd between results
Yeah I did. sorry about the rushed typing. DRH managed to sort it out for me. I had imported a ver 2 database to version 3 and changed a time values to integers, but forgot to change the column to integer. Lloydie-T - Original Message - From: "Kurt Welgehausen" <[EMAIL PROTECTED]> To: Sent: Saturday, March 25, 2006 5:39 PM Subject: Re: [sqlite] Wierd between results "Lloyd Thomas" <[EMAIL PROTECTED]> wrote: if use SELECT count(call_id) as num_rows WHERE ring_time BETWEEN 6 and 10; I get 0 results You DID specify a table in your actual queries, didn't you? select * from tbl; t x y -- -- -- 1 100 101 2 100 102 3 100 103 4 100 103 5 200 210 6 200 220 7 200 230 8 300 199 select count(t) from tbl where y=103; count(t) -- 2 select count(t) from tbl where y between 102 and 210; count(t) -- 5 Regards
Re: [sqlite] Wierd between results
"Lloyd Thomas" <[EMAIL PROTECTED]> wrote: > if use > SELECT count(call_id) as num_rows WHERE ring_time BETWEEN 6 and 10; > I get 0 results You DID specify a table in your actual queries, didn't you? select * from tbl; t x y -- -- -- 1 100 101 2 100 102 3 100 103 4 100 103 5 200 210 6 200 220 7 200 230 8 300 199 select count(t) from tbl where y=103; count(t) -- 2 select count(t) from tbl where y between 102 and 210; count(t) -- 5 Regards
Re: [sqlite] Wierd between results
"Lloyd Thomas" <[EMAIL PROTECTED]> wrote: > I am not sure if I am being crazy, but I seem to be getting a wierd result > when using 'BETWEEN'. > > if use > SELECT count(call_id) as num_rows WHERE ring_time BETWEEN 6 and 10; > I get 0 results > but if I do > SELECT count(call_id) as num_rows WHERE ring_time = 7; > I get 39 results > > SELECT count(call_id) as num_rows WHERE ring_time > 6 and ring_time <10; > Also gives 0 results. > Please send me your database by private email and I will take a look. -- D. Richard Hipp <[EMAIL PROTECTED]>
Re: [sqlite] Wierd between results
Go back to my original problem if I change 'between 6 and 10' to 'between 6 and 9', I get the expected results. SELECT count(call_id) as num_rows WHERE ring_time BETWEEN 6 and 9; 232 Am I finding a bug or is my syntax incorrect? - Original Message - From: "Lloyd Thomas" <[EMAIL PROTECTED]> To: Sent: Saturday, March 25, 2006 4:14 PM Subject: Re: [sqlite] Wierd between results If i do SELECT count(call_id) as num_rows WHERE ring_time BETWEEN 10 and 6; I get 633 results. Is that normal? - Original Message - From: "Lloyd Thomas" <[EMAIL PROTECTED]> To: Sent: Saturday, March 25, 2006 3:48 PM Subject: [sqlite] Wierd between results I am not sure if I am being crazy, but I seem to be getting a wierd result when using 'BETWEEN'. if use SELECT count(call_id) as num_rows WHERE ring_time BETWEEN 6 and 10; I get 0 results but if I do SELECT count(call_id) as num_rows WHERE ring_time = 7; I get 39 results SELECT count(call_id) as num_rows WHERE ring_time > 6 and ring_time <10; Also gives 0 results. Where am I going wrong? sqlite 3.2.8 windows XP Lloydie-T
Re: [sqlite] Wierd between results
If i do SELECT count(call_id) as num_rows WHERE ring_time BETWEEN 10 and 6; I get 633 results. Is that normal? - Original Message - From: "Lloyd Thomas" <[EMAIL PROTECTED]> To: Sent: Saturday, March 25, 2006 3:48 PM Subject: [sqlite] Wierd between results I am not sure if I am being crazy, but I seem to be getting a wierd result when using 'BETWEEN'. if use SELECT count(call_id) as num_rows WHERE ring_time BETWEEN 6 and 10; I get 0 results but if I do SELECT count(call_id) as num_rows WHERE ring_time = 7; I get 39 results SELECT count(call_id) as num_rows WHERE ring_time > 6 and ring_time <10; Also gives 0 results. Where am I going wrong? sqlite 3.2.8 windows XP Lloydie-T
[sqlite] Wierd between results
I am not sure if I am being crazy, but I seem to be getting a wierd result when using 'BETWEEN'. if use SELECT count(call_id) as num_rows WHERE ring_time BETWEEN 6 and 10; I get 0 results but if I do SELECT count(call_id) as num_rows WHERE ring_time = 7; I get 39 results SELECT count(call_id) as num_rows WHERE ring_time > 6 and ring_time <10; Also gives 0 results. Where am I going wrong? sqlite 3.2.8 windows XP Lloydie-T