Re: [sqlite] Bug in division?

2014-04-30 Thread Charles J. Daniels
This is a very common thing. Many programming languages, like C++, do the same thing. So it's not just a SQL thing. --charlie On Wed, Apr 30, 2014 at 7:11 AM, Marc L. Allen wrote: > Not an error. Int/Int uses integer division and results in an integer > number. When

Re: [sqlite] Bug in division?

2014-04-30 Thread Petite Abeille
On Apr 30, 2014, at 8:50 PM, Jay Kreibich wrote: > Given Oracle’s legacy, it might be that “2” defaults to a “numeric” type, > rather than an integer. Indeed, there are no ‘integer’ type per se in Oracle. At least not at the SQL level. But more to the point, I don’t thing the

Re: [sqlite] Bug in division?

2014-04-30 Thread Rob Richardson
I don't know if it's in the SQL standard or not, but the C, C++ and C# languages all act this way. The result of mathematical operations on integers is always an integer. If you want the result to be a floating-point number, you have to force at least one of the operands to be a

[sqlite] Problem with ODBC Access via Code

2014-04-30 Thread Leist, Carsten
Hi @all, I want to link a table of my Database dynamically on runtime. I use the following code in my Access2007 DB Dim tdf As DAO.TableDef Set tdf = CurrentDb.CreateTableDef("tableName") tdf.Connect = "ODBC;DRIVER=SQLite3 ODBC Driver;Database=C:\SQLite\MyDB.sqlite;" tdf.SourceTableName =

Re: [sqlite] Bug in division?

2014-04-30 Thread Jay Kreibich
On Apr 30, 2014, at 1:00 PM, Petite Abeille wrote: > > On Apr 30, 2014, at 2:22 PM, John McKown wrote: > >> PostgreSQL likewise returns 0 for 2/4 and .5 for 2/4.0 . This is likely a >> part of the SQL standard. > > Just to be

Re: [sqlite] Bug in division?

2014-04-30 Thread Petite Abeille
On Apr 30, 2014, at 2:22 PM, John McKown wrote: > PostgreSQL likewise returns 0 for 2/4 and .5 for 2/4.0 . This is likely a > part of the SQL standard. Just to be contrarian, Oracle doesn’t and returns 0.5. Ah! ___

Re: [sqlite] detach failed with error code 1

2014-04-30 Thread dd
I have set busy time out for 5 seconds and given different names for every attach and detaching database. still, this error is not getting fixed. prepare, step and finalize are not throwing any errors. What is the alternative solution for attach and detaching database? Thanks in advance. On

Re: [sqlite] Bug in division?

2014-04-30 Thread John McKown
PostgreSQL likewise returns 0 for 2/4 and .5 for 2/4.0 . This is likely a part of the SQL standard. On Wed, Apr 30, 2014 at 7:11 AM, Marc L. Allen wrote: > Not an error. Int/Int uses integer division and results in an integer > number. When one number is a float,

Re: [sqlite] Bug in division?

2014-04-30 Thread Marc L. Allen
Not an error. Int/Int uses integer division and results in an integer number. When one number is a float, the result becomes a float. I don't know about all SQL varieties, but MSSQL is the same. > On Apr 30, 2014, at 8:04 AM, "Gene Connor" wrote: > > > SELECT

[sqlite] Bug in division?

2014-04-30 Thread Gene Connor
SELECT DISTINCT 2/4 AS RESULT FROM TABLE;returns 0 SELECT DISTINCT 2/4.0 AS RESULT FROM TABLE;returns 0.5 (correct) SELECT DISTINCT 2.0/4 AS RESULT FROM TABLE;returns 0.5 (correct) SELECT DISTINCT 2.0/4.0 AS RESULT FROM TABLE;returns 0.5 (correct) SELECT DISTINCT 2.0/4.01 AS RESULT FROM

Re: [sqlite] When to open/close connections

2014-04-30 Thread Yuriy Kaminskiy
Simon Slavin wrote: > On 29 Apr 2014, at 2:24pm, Drago, William @ MWG - NARDAEAST > wrote: > >> Does closing the connection force, or at least encourage, the OS to write to >> disk whatever it might have been caching? > > Closing a connection calls fclose() on the

Re: [sqlite] Is there any reason which use OS file system on default mode?

2014-04-30 Thread Simon Slavin
On 30 Apr 2014, at 8:49am, 김병준 wrote: > If sqlite3 access storage device directly, I think, it must be faster than > using os file system. > Because using os file system mean there must be some overhead. > So, I'm curious about the reason why use os file system default.

[sqlite] Is there any reason which use OS file system on default mode?

2014-04-30 Thread 김병준
If sqlite3 access storage device directly, I think, it must be faster than using os file system. Because using os file system mean there must be some overhead. So, I'm curious about the reason why use os file system default. ___ sqlite-users mailing