[sqlite] Problem with accumulating decimal values

2015-12-11 Thread Frank Millman
; SELECT bal FROM fmtemp; 5925.599 sqlite> UPDATE fmtemp SET balance = balance + 123.45; sqlite> SELECT bal FROM fmtemp; 6049.049 Can anyone explain what is going on, and is there a way to avoid it? Thanks Frank Millman

[sqlite] Problem with accumulating decimal values

2015-12-12 Thread Frank Millman
From: Frank Millman Sent: Friday, December 11, 2015 4:21 PM To: sqlite-users at mailinglists.sqlite.org Subject: [sqlite] Problem with accumulating decimal values > Hi all > > I am having a problem accumulating decimal values. > > I am actually using Python, but

[sqlite] Problem with recursive CTE

2014-08-25 Thread Frank Millman
of sqlite3, or is there any workaround? Thanks Frank Millman ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Problem with recursive CTE

2014-08-25 Thread Frank Millman
From: "Frank Millman" <fr...@chagford.com> WITH RECURSIVE temp AS ( [initial-select UNION ALL recursive-select] ) SELECT * FROM temp UNION * FROM temp Sorry, I meant SELECT * FROM temp UNION SELECT * FROM temp Frank ___ sqli

Re: [sqlite] Problem with recursive CTE

2014-08-25 Thread Frank Millman
From: "Frank Millman" <fr...@chagford.com>Thanks for the reply, Richard. WITH RECURSIVE temp(x) AS ( SELECT 1 UNION ALL SELECT x+1 FROM temp WHERE x<5 ) SELECT x FROM temp UNION SELECT x+5 FROM temp; And did indeed get integers 1 through 10 as an answer. I get the s

Re: [sqlite] Problem with recursive CTE

2014-08-25 Thread Frank Millman
- Original Message - From: "Keith Medcalf" To: "General Discussion of SQLite Database" Sent: Monday, August 25, 2014 2:28 PM Subject: Re: [sqlite] Problem with recursive CTE Looking backwards on the list one finds that: There was a

Re: [sqlite] Problem with recursive CTE

2014-08-25 Thread Frank Millman
- Original Message - From: "Frank Millman" <fr...@chagford.com> To: <sqlite-users@sqlite.org> Sent: Monday, August 25, 2014 2:32 PM Subject: Re: [sqlite] Problem with recursive CTE Could it be a version problem? I am using the version bundled with P

Re: [sqlite] Problem with recursive CTE

2014-08-26 Thread Frank Millman
- Original Message - From: "Alek Paunov" <a...@declera.com> To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> Sent: Monday, August 25, 2014 4:04 PM Subject: Re: [sqlite] Problem with recursive CTE On 25.08.2014 15:42, Frank

[sqlite] Foreign key on different database - possible?

2010-10-20 Thread Frank Millman
database and the child table is in another database. However, when I use the syntax 'REFERENCES database.tablename' I get a syntax error. Is it possible to do what I want? Thanks Frank Millman ___ sqlite-users mailing list sqlite-users@sqlite.org http

Re: [sqlite] Foreign key on different database - possible?

2010-10-20 Thread Frank Millman
Dan Kennedy wrote: > > On Oct 20, 2010, at 3:59 PM, Frank Millman wrote: > > > Hi all > > > > I am using SQLite 3.7.2 on Fedora 10. > > > > I have multiple databases, which I can access concurrently > by using > > the > > 'a

Re: [sqlite] Foreign key on different database - possible?

2010-10-20 Thread Frank Millman
Drake Wilson wrote: > > Quoth Frank Millman <fr...@chagford.com>, on 2010-10-20 > 11:47:06 +0200: > > Ok, thanks. > > > > Is there any chance of it being considered for a future release? > > Search http://www.sqlite.org/cvstrac/wiki?p=SqliteWikiFaq fo

Re: [sqlite] Problem with CASE in WHERE clause

2016-12-03 Thread Frank Millman
From: Simon Slavin Sent: Sunday, December 04, 2016 8:42 AM To: SQLite mailing list Subject: Re: [sqlite] Problem with CASE in WHERE clause On 4 Dec 2016, at 8:42am, Simon Slavin slav...@bigfraud.org wrote: > What are we allowed to change ? Are you asking us to find a "SELECT" command >

[sqlite] Problem with CASE in WHERE clause

2016-12-03 Thread Frank Millman
and cross-database, and PostgreSQL does not accept an integer for a BOOL column. I am using version 3.14.2 on Windows 10. Any suggestions? Thanks Frank Millman ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http

Re: [sqlite] Problem with CASE in WHERE clause

2016-12-04 Thread Frank Millman
From: Simon Slavin Sent: Sunday, December 04, 2016 10:26 AM To: SQLite mailing list Subject: Re: [sqlite] Problem with CASE in WHERE clause > On 4 Dec 2016, at 6:55am, Frank Millman <fr...@chagford.com> wrote: > > > If a column contains a ‘1’, I would expect sqlite3 t

Re: [sqlite] Problem with CASE in WHERE clause

2016-12-05 Thread Frank Millman
From: Jean-Christophe Deschamps Sent: Monday, December 05, 2016 9:48 AM To: SQLite mailing list Subject: Re: [sqlite] Problem with CASE in WHERE clause > > At 06:29 05/12/2016, you wrote: > >My app supports sqlite3, SQL Server, and PostgreSQL. > > > >SQL Server has a ‘bit’ data type,

Re: [sqlite] Problem with CASE in WHERE clause

2016-12-04 Thread Frank Millman
From: Don V Nielsen Sent: Sunday, December 04, 2016 5:15 PM To: SQLite mailing list Subject: Re: [sqlite] Problem with CASE in WHERE clause > Sorry, but the whole scenario is messy, at best. The column is declared bool, and then a string '1' is assigned to it. The case lacks an else, so it

Re: [sqlite] Running query in command window is slow

2017-09-22 Thread Frank Millman
Richard Hipp wrote: On 9/22/17, Frank Millman <fr...@chagford.com> wrote: > > I see that Python is using Sqlite3 3.14.2. > > What version of the command-line shell are you using? It would be a problem > if the command-line shell is a later version and yet is running slower

Re: [sqlite] Running query in command window is slow

2017-09-22 Thread Frank Millman
Clemens Ladisch wrote: > > > Frank Millman wrote: > > I have a fairly complex query. If I execute it using Python, it takes > > 1 second. If I copy and paste it into the Sqlite3 command window, it > > takes 10 minutes. > > Probably different SQLite versions. &g

[sqlite] Running query in command window is slow

2017-09-22 Thread Frank Millman
, it seems odd. Can anyone suggest a reason for this? Thanks Frank Millman ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Selecting data from WITH clause is very slow

2017-09-11 Thread Frank Millman
On Mon Sep 11, 2017 at 11:15:22AM +0200, no...@null.net wrote: > SELECT > acc_no, > acc_name, > SUM(i_90.invoice_bal) AS 90_days, > SUM(i_current.invoice_bal) AS current > FROM >debtors_table > LEFT JOIN > invoices i_90 > ON >

Re: [sqlite] Selecting data from WITH clause is very slow

2017-09-11 Thread Frank Millman
Clemens Ladisch wrote: > Frank Millman wrote: > > I changed it to use a WITH clause to make one scan of the invoice table and > > store the results. > The WITH clause itself does not store anything; it's syntactic sugar [...] To > force the ageing results to be stored,

[sqlite] Selecting data from WITH clause is very slow

2017-09-11 Thread Frank Millman
but 3.5 seconds seems a long time to extract the data from 60 rows. Is there any way to speed this up? Frank Millman ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Database is locked

2018-03-02 Thread Frank Millman
On 2/28/18 3:18 PM, Frank Millman wrote: > > On 2/28/18 2:53 PM, Richard Damon wrote: > > > > > On 2/28/18 6:59 AM, Frank Millman wrote: > > > Hi all > > > > > > I am using Python 3.6.0 and sqlite3 3.20.1. I am getting the message > >

Re: [sqlite] Database is locked

2018-02-28 Thread Frank Millman
On 2/28/18 2:53 PM, Richard Damon wrote: > > On 2/28/18 6:59 AM, Frank Millman wrote: > > Hi all > > > > I am using Python 3.6.0 and sqlite3 3.20.1. I am getting the message > > ‘database is locked’ which, from reading the docs, I think is coming from > >

[sqlite] Database is locked

2018-02-28 Thread Frank Millman
, then the connection which did *not* hold the lock fails with ‘database is locked’, and the connection which *did* hold the lock completes normally. Is there any way to get the behaviour that I am looking for? Thanks Frank Millman ___ sqlite-users mailing

Re: [sqlite] Question about floating point

2018-12-14 Thread Frank Millman
On Dec 15, 2018, at 08.58, Jay Kreibich wrote: > > > On Dec 15, 2018, at 12:49 AM, Frank Millman wrote: > > > > I know that floating point is not precise and not suitable for financial > > uses. Even so, I am curious about the following - > > [...] > >

Re: [sqlite] Question about floating point

2018-12-15 Thread Frank Millman
On 2018-12-14 11:24 AM, Darren Duncan wrote: > > If yours is a financial application then you should be using exact numeric > types only, such as integers that represent multiples of whatever quantum you are using, such as cents; fractional numbers are a display or user input format only,

[sqlite] Question about floating point

2018-12-14 Thread Frank Millman
;select sum(amount_cust) from ar_trans where cust_row_id = 4 >>> and tran_date between '2015-05-01' and '2015-05-31'") >>> cur.fetchone() (211496.252,) With the same version of sqlite3 and the same select statement, why does python return a different result from sqlite3