[sqlite] SQLite Update With CTE

2017-08-21 Thread John McMahon
Hi I am rewriting an old Perl script that selectively updates data from one table to another using this statement: UPDATE CUSTOMERS SET cust1= ?, cust2= NULL, street = ?, town = ?, postcode = ? WHERE custnum = ? I am intending to replace it with something

Re: [sqlite] what is server-process-edition?

2017-08-21 Thread Rowan Worth
https://sqlite.org/src/artifact/0c6bc6f55191b690 (it was linked recently by Richard Hipp in another thread, to pre-empt questions of "how did you find that" :) ) -Rowan On 22 August 2017 at 10:22, Gelin Yan wrote: > Hi All > >I noticed there is a tag called

[sqlite] what is server-process-edition?

2017-08-21 Thread Gelin Yan
Hi All I noticed there is a tag called server-process-edition in the timeline but failed to find any related documents. I am curious what it is. Regards gelin yan ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Compiling spellfix for sqlite3

2017-08-21 Thread Keith Medcalf
On Monday, 21 August, 2017 11:44, curmudgeon wrote: >Thanks Keith. I followed your instructions but I'm now getting the >following compiler errors >[bcc32 Error] carray.c(412): E2342 Type mismatch in parameter 'xInit' >(wanted 'void (*)()', got 'void *') >// on the 'nErr +=

Re: [sqlite] Possible SQLite bug using an uncollated index with a collated query

2017-08-21 Thread Jens Alfke
> On Aug 18, 2017, at 11:29 PM, Dan Kennedy wrote: > > On 08/18/2017 05:39 AM, Jens Alfke wrote: >> I believe I may have found a bug in SQLite 3.18. I've got a query that >> returns a correct result set when there are no indexes in the database, but >> returns an

Re: [sqlite] Order By gives different result

2017-08-21 Thread Dan Kennedy
On 08/21/2017 11:51 PM, Stephen Chrzanowski wrote: I think I may have found a query issue. I haven't checked the SQLite docs to see if this is something that is specified as an order of operations, or if this is a check that has been overlooked. I think using a column alias in a complex

Re: [sqlite] Compiling spellfix for sqlite3

2017-08-21 Thread curmudgeon
Thanks Keith. I followed your instructions but I'm now getting the following compiler errors [bcc32 Error] carray.c(412): E2342 Type mismatch in parameter 'xInit' (wanted 'void (*)()', got 'void *') // on the 'nErr += sqlite3_auto_extension((void*)sqlite3_carray_init); line' [bcc32 Error]

Re: [sqlite] Compiling spellfix for sqlite3

2017-08-21 Thread Keith Medcalf
You have to add the carray.c and core_init functions right at the end of the file (not inside any other code blocks). The way you have it the carray.c is included only if SQLITE_ENABLE_STMTVTAB is enabled. So it should look like this: #endif /* SQLITE_CORE */ #endif /* !defined(SQLITE_CORE)

[sqlite] Order By gives different result

2017-08-21 Thread Stephen Chrzanowski
I think I may have found a query issue. I haven't checked the SQLite docs to see if this is something that is specified as an order of operations, or if this is a check that has been overlooked. The database SQL code is here: https://pastebin.com/raw/FukX4qEB select

Re: [sqlite] Compiling spellfix for sqlite3

2017-08-21 Thread curmudgeon
Keith, I know this is an old post but it refers to something we discussed recently. I tried the following I added the #include carray.c line to just above the bottom of the amalgamation such that the last few lines are #include carray.c #endif /* SQLITE_CORE */ #endif /* !defined(SQLITE_CORE)

Re: [sqlite] PRAGMA table_info could not update schema

2017-08-21 Thread Rowan Worth
On 21 August 2017 at 17:25, Clemens Ladisch wrote: > sanhua.zh wrote: > > I find that `PRAGMA table_info(tableName)` will not check the expired > schema which is modified by other sqlite connections. > > > > Here is the sample code: > > That code is incomplete and buggy.

Re: [sqlite] PRAGMA table_info could not update schema

2017-08-21 Thread sanhua.zh
It's great idea for reproducing with two command-line shells. Of cource, it can be reproduced with shells and here is the test code. Note that you should really care the order for running code. ``` Command-line shell 1: $ sqlite3 SQLite version 3.16.0 2016-11-04 19:09:39 Enter ".help" for

Re: [sqlite] PRAGMA table_info could not update schema

2017-08-21 Thread Clemens Ladisch
sanhua.zh wrote: > I find that `PRAGMA table_info(tableName)` will not check the expired schema > which is modified by other sqlite connections. > > Here is the sample code: That code is incomplete and buggy. (Heed the compiler warnings!) Anyway, I can reproduce this with two command-line

[sqlite] PRAGMA table_info could not update schema

2017-08-21 Thread sanhua.zh
I find that `PRAGMA table_info(tableName)` will not check the expired schema which is modified by other sqlite connections. 1. Open conn 1 and conn 2. 2. Run a SQL to load the schema for conn 2 3. Change the schema using conn 1 by create-table-statement. 4. Get the schema using conn 2 by