RE: [sqlite] Decimal conversion

2006-01-23 Thread nbiggs
Thanks Dennis, I will give that a shot. -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Monday, January 23, 2006 11:20 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Decimal conversion nbiggs wrote: >I was using version 3.2.1. I downloaded 3.3.1 and y

Re: [sqlite] Decimal conversion

2006-01-23 Thread Dennis Cote
nbiggs wrote: I was using version 3.2.1. I downloaded 3.3.1 and your suggestion worked, but it is very slow compared to 3.2.1. I use the original query to test the speed. 3.2.1 returned the data in a little over 10 seconds while 3.3.1 took a minute. Why is that? I don't know. There

RE: [sqlite] Decimal conversion

2006-01-20 Thread nbiggs
and then loaded 3.3.1 from the .sql files. -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Thursday, January 19, 2006 2:31 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Decimal conversion nbiggs wrote: >When I try executing the command I get 'SQL error: n

Re: [sqlite] Decimal conversion

2006-01-19 Thread Dennis Cote
nbiggs wrote: When I try executing the command I get 'SQL error: near "as": syntax error'. Let me explain what I am trying to do, there might be a better way to do it. I have a table of weights as one of the columns. I am trying to return data so that I can create a histogram of the data. My

RE: [sqlite] Decimal conversion

2006-01-19 Thread nbiggs
My query is as follows: Select round(field, 1), count(*) from table group by round(field, 1); -Original Message- From: Dennis Cote [mailto:[EMAIL PROTECTED] Sent: Thursday, January 19, 2006 1:31 PM To: sqlite-users@sqlite.org Subject: Re: [sqlite] Decimal conversion nbiggs wrote: >How

Re: [sqlite] Decimal conversion

2006-01-19 Thread Dennis Cote
nbiggs wrote: How do I convert the number 49.991 to just 49.9 in a select statement? Using the round(weight, 1) returns 50.0. Is there a truncate function? Nathan, You can use: select cast ((field * 10) as integer) / 10.0 If this is something you do a lot of it might make sense to