[sqlite] Proper way to abort

2015-08-24 Thread Jean-Christophe Deschamps
> >I have some queries that may take 5-15 seconds to complete. Sometimes >the situation changes shortly after starting the query where my >program does not need those results anymore and the program wants to >abort and begin a different query instead. > >My question is: What is the proper way t

[sqlite] Why sqlite show qualified column names when selecting from views ?

2015-08-25 Thread Jean-Christophe Deschamps
At 22:28 25/08/2015, you wrote: >In the next version of SQLite3 the names of all columns will be >'columnname' "Don't trust me" could be more apropriate.

[sqlite] order by not working in combination with random()

2015-08-27 Thread Jean-Christophe Deschamps
At 16:00 27/08/2015, you wrote: > >An *ORDER BY* clause in SQL specifies >that a SQL SELECT statement >returns a result set with the >rows being sorted by the values of one or

[sqlite] order by not working in combination with random()

2015-08-27 Thread Jean-Christophe Deschamps
>I can see both sides of this debate, whether or not random() should be >evaluated twice in this context: > >select random() from blah order by random() There are 2 distinct and volontary function invokations, so I don't see how SQL engine would decide not to perform the second call. >So let me

[sqlite] order by not working in combination with random()

2015-08-27 Thread Jean-Christophe Deschamps
At 21:11 27/08/2015, you wrote: > > There are 2 distinct and volontary function invokations, so I don't see > > how SQL engine would decide not to perform the second call. > >Agreed, though I'm pretty sure I've read messages in this thread at >advocate the same function should return the same valu

[sqlite] autoincrement field

2015-08-27 Thread Jean-Christophe Deschamps
At 23:25 27/08/2015, you wrote: >--- >I have a table structure like this: > >CREATE TABLE padstack ( > id INTEGER PRIMARY KEY AUTOINCREMENT, > pin_number INTEGER, > name TEXT >); > >Is there any way to get the 'id' of newly inserted row? My insert of >course >not contains the 'id' fie

[sqlite] order by not working in combination with random()

2015-08-28 Thread Jean-Christophe Deschamps
At 09:14 28/08/2015, you wrote: >--- > > Looks like "How many zillion devices are going to misbehave if this > is fixed?" > >We will find out, because SQLite was changed two days ago: >http://www.sqlite.org/cgi/src/info/c2f3bbad77850468 >--- Fine, let's sit down and watch the world collapse. No

[sqlite] explain plan change between SQLite 3.8.3.1 and 3.8.11.1

2015-08-31 Thread Jean-Christophe Deschamps
At 11:58 31/08/2015, you wrote: >--- >But the only sure way to prevent anyone else from installing its own >authorizer is to change the function name in the SQLite library. >--- That wouldn't really work under Windows: GetProcAddress can provide access to a DLL function by index (ordinal value)

[sqlite] With recursive question

2015-03-01 Thread Jean-Christophe Deschamps
Dear list, After trying a number of ways I'm at loss solving the seemingly simple problem. For a simplified example say I have a list of individual filesystem directories with FK pointing to their parent: PRAGMA foreign_keys=ON; CREATE TABLE "Dirs" ( "DirID" INTEGER NOT NULL PRIMARY KEY,

[sqlite] With recursive question (addendum)

2015-03-01 Thread Jean-Christophe Deschamps
Forgot to mention that I sees the issue as fundamentally distinct from the Mandelbrot example in the SQLite docs: it uses a construct -outlined in procedural statements- like: For x in xRange For y in yRange compute something like f(x, y) -- here, y is independant of x Next y Next x

[sqlite] With recursive question

2015-03-01 Thread Jean-Christophe Deschamps
Once again thank you very much Igor. I was making my life miserable trying to scan the "tree" from the other end. At 00:37 01/03/2015, you wrote: >It's a bit unfortunate that you made the root a parent of itself. >Forces the query to make an extra check to avoid infinite recursion. `--- Ye

[sqlite] User-defined types -- in Andl

2015-06-09 Thread Jean-Christophe Deschamps
At 08:27 09/06/2015, you wrote: >Andl is at a slightly higher level than SQL for writing simple queries. >Where it shines is writing complex queries that involve user-defined >types, >custom transformations and custom aggregations. For complex relational >operations there is nothing I know th

[sqlite] User-defined types -- in Andl

2015-06-09 Thread Jean-Christophe Deschamps
At 13:50 09/06/2015, you wrote: >BTW I don't remember the last time I saw SQL like this. Understanding it >might be the challenge `--- Most probably! I can imagine that you don't encounter such style in common business-like environments. Take your time, this SQL piece is clearly beyond norm

[sqlite] Mozilla wiki 'avoid SQLite'

2015-06-16 Thread Jean-Christophe Deschamps
I've refrained to comment about the OP linked page but I can't resist that long. I won't enter the C, C--, C++, C#, Java, Python, COBOL, Basic, assembler, Ruby, YouNameIt sub-debate. I found the rant on MozillaWiki way too wrong on too many points to keep quiet. While I can agree with some of

[sqlite] Mozilla wiki 'avoid SQLite'

2015-06-17 Thread Jean-Christophe Deschamps
Marco, >There's never been that kind of tone, the article has been written to >point >new Mozilla codebase contributors at possible pitfalls we already hit in >the past, and actually help them making informed decisions. That's not how one reads it. Start with only the title: "Performance/Avoid

[sqlite] full table scan ignores PK sort order?

2015-03-03 Thread Jean-Christophe Deschamps
At 11:27 03/03/2015, you wrote: >- the full table scan returns rows in rowID order, which is the order >in which the rows were added to the table `--- No and no. An SQL engine doesn't guarantee any row "order" unless you explicitely force an ORDER BY clause. Think of row order as random, w

[sqlite] With recursive question

2015-03-03 Thread Jean-Christophe Deschamps
At 04:05 01/03/2015, you wrote: >On 2/28/2015 7:22 PM, Jean-Christophe Deschamps wrote: >>Once again thank you very much Igor. I was making my life miserable >>trying to scan the "tree" from the other end. > >That, too, could be arranged. Something along these lines

Re: [sqlite] Explicit "read transaction" with journal_mode=WAL.

2019-07-31 Thread Jean-Christophe Deschamps
Simon, Consider a bank which takes an audit every day at close-of-business. This might be declared to be 5pm. However, accounts are continued to be debited and credited all night, due to interest being added, ATM transactions, etc.. Nevertheless, the audit needs to see a snapshot as of 5pm

Re: [sqlite] [EXTERNAL] select for power-meter accumulated total readings

2019-08-08 Thread Jean-Christophe Deschamps
Beware that row id 6655 isn't correct (total_kwh is suddenly decreasing). This inconsistancy maybe related to row 6654 missing: manipulated data? So you'd have to sanitize your data first. ID TIMESTAMP TOTAL_KWH 66532019-08-06 22:23:26.000 1494.00 66552019-07-30 22:32:26.000 15

Re: [sqlite] [EXTERNAL] select for power-meter accumulated total readings

2019-08-08 Thread Jean-Christophe Deschamps
Oops, didn't notice the date of said row was out of sequence wrt rowids. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] using lower function with utf8

2019-09-19 Thread Jean-Christophe Deschamps
I was messing about with this and tried the following in sqlite expert professional select unicode(lower(char(256))); I was quite surprised when it responded with the correct result 257. Looking at the sqlite3.c code I can’t see anything that suggests sqlite would handle lower() for non-a

Re: [sqlite] Roadmap?

2019-10-27 Thread Jean-Christophe Deschamps
Hi Simon, Especially since it can't do something more fundamental than STDEV: return all surnames starting with the Unicode character 'Å'. Reconsider as this works fine. JcD ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http

Re: [sqlite] How to determine the column type?

2019-12-14 Thread Jean-Christophe Deschamps
dump+100 (string), pass+1000 (string) the type information disappears and former integers becomes mere strings There must be something else going on here: Z:> sqlite3 SQLite version 3.30.1 2019-10-10 20:19:45 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".o

Re: [sqlite] After column add, what should be done to update the schema?

2020-02-27 Thread Jean-Christophe Deschamps
Bonjour, I use a simple ALTER TABLE ADD COLUMN statement. However, when I use the Sqlite Expert, the DDL is not reflected. Even though the column is created. I read somewhere that the DDL is really just a copy of the text when teh table was created. Is there a way to refresh this? I can't re

<    1   2   3   4   5