[sqlite] The importance of beta-testing. Was: Crash Report

2016-09-19 Thread Richard Hipp
On 9/18/16, Keith Medcalf wrote: > > Somewhere between: > > 2016-09-03 16:23:42 672c21bcf09c5bfb67e061456a56be45409c4f34 > > 2016-09-09 20:23:59 19e2e5950541f1a93eed994cc2b1eaf64b68e858 > > where the former works and the later crashes (with a wunderful new fangled > Windows

[sqlite] ANN: SQLite PHP Generator 16.9 released

2016-09-19 Thread SQL Maestro Group
Hi! SQL Maestro Group announces the release of SQLite PHP Generator 16.9, a powerful GUI frontend for Windows that allows you to generate feature-rich CRUD web applications for your SQLite database. http://www.sqlmaestro.com/products/sqlite/phpgenerator/ Online demos:

Re: [sqlite] rowid changing....

2016-09-19 Thread Dominique Devienne
On Sun, Sep 18, 2016 at 4:19 PM, mikeegg1 wrote: > Thanks everyone. I was mis-equating REPLACE with UPDATE. I’ll change my > code to “INSERT or IGNORE” and add an UPDATE. > For info, that's a common gotcha with SQLite. See [1] from 2-months ago, but I'm sure the archives are

[sqlite] Fwd: SQLite 3.14.2 autoconf (shell) doesn't build with SQLITE_OMIT_AUTHORIZATION, undefined reference

2016-09-19 Thread Jose Arroyo
Hello everyone, I couldn't find this in the existing bug list so I decided to send this email. I downloaded the latest SQLite autoconf version from https://www.sqlite.org/2016/sqlite-autoconf-3140200.tar.gz and tried building it using this compile option, doing

Re: [sqlite] Slow Sqlite3 Select Query while Insert/Update/Delete has no issue

2016-09-19 Thread Dominique Devienne
On Mon, Sep 19, 2016 at 4:56 PM, James K. Lowden wrote: > On Wed, 14 Sep 2016 16:27:37 +0530 > > But I agree with Teg: SQLite is providing you with transactions you > don't need, and puts an interpreted language exactly where you don't > want it: in a

Re: [sqlite] WHERE col IN tab

2016-09-19 Thread Dominique Devienne
On Fri, Sep 16, 2016 at 6:50 PM, Richard Hipp wrote: > On 9/16/16, Dominique Devienne wrote: > > Is that <> SQL standard? > > That feature was added to SQLite on 2004-01-15 > (http://sqlite.org/src/timeline?c=01874d25). I do not recall why I > added it. >

[sqlite] SQLite Tcl copy command

2016-09-19 Thread Andy Goth
I'm trying to import databases from CSV into an in-memory database. These CSV files contain quoted delimiters (a,"b,c",d is three columns), plus they contain a header row. These two issues are not handled by the SQLite Tcl extension's copy command. The SQLite shell's .import command used to have

[sqlite] multilingual FTS5 stemmer

2016-09-19 Thread Abilio Marques
Past year I was following the progress of FTS5 with the idea of making a multilingual stemmer extension. Due to being busy in other things I lost track of it, until a couple of weeks ago, when I decided to upgrade the code I had made back then. It uses the Snowball generated libstemmer. It works

Re: [sqlite] Slow Sqlite3 Select Query while Insert/Update/Delete has no issue

2016-09-19 Thread James K. Lowden
On Wed, 14 Sep 2016 16:27:37 +0530 SinhaK wrote: > strlen(MyString.str().c_str()) BTW, as a matter of style, MyString.str().size() gets you to the same place sooner. > MyString<<"select TokenNo,Price ,sum(QTY) from 'Stream0' where > TokenNo=?1 and

Re: [sqlite] WHERE col IN tab

2016-09-19 Thread James K. Lowden
On Fri, 16 Sep 2016 16:59:17 +0200 Dominique Devienne wrote: > Is that <> SQL standard? No. The two most frequently used pointless words in SQL are "select *". The SELECT clause (not statement) chooses columns; in relational algebra terms, it's a project operator. If

Re: [sqlite] how is "pragma threads = 4" working

2016-09-19 Thread James K. Lowden
On Fri, 16 Sep 2016 07:29:28 -0400 Richard Hipp wrote: > The algorithm used for "ORDER BY ... LIMIT N" uses much less memory > than a full-up "ORDER BY" because is only keeps track of the top N > entries seen so far, discarding the rest. But it also only uses a > single thread.

Re: [sqlite] When is data committed on one connection seen on another?

2016-09-19 Thread James K. Lowden
On Wed, 14 Sep 2016 18:29:36 + (UTC) Alex Ward wrote: > Perhaps our schema needs a rework, would one table with a million > rows be better than 500 tables with 2000 rows each? 500 tables isn't right or wrong, but *counting* tables is. Table count is not a design-quality

Re: [sqlite] Complicated join

2016-09-19 Thread James K. Lowden
On Thu, 15 Sep 2016 15:53:10 + (UTC) David Bicking wrote: > (1) The CombinedKeyFields must always match in each table(2) Match > using the EvtNbr, but if no match, use the lowest M.EvtNbr that > matches the CombinedKeyFields > > (3) Match using the TransDate but if no

Re: [sqlite] Complicated join

2016-09-19 Thread David Bicking
INSERT INTO M (CombinedKeyField, EvtNbr) VALUES ('A', 1), ('A', 5); INSERT INTO E (CombineKeyField, EvtNbr) VALUES ('A', 1) , ('A', 2) , ('A', 3) , ('A', 4) , ('A', 5) , ('A', 6) , ('A', 7) , ('A', 8) , ('A', 9) , ('B', 1); I'm ignoring the TransDate part for now. This is what I want: SELECT

Re: [sqlite] Complicated join

2016-09-19 Thread David Bicking
"CombinedKeyFields", is in fact about 7 or 8 fields in the natural key. If I mistype 17 letters, I'd hate to see how I mangle the whole thing. From: Luuk To: sqlite-users@mailinglists.sqlite.org Sent: Monday, September 19, 2016 2:23 PM Subject: Re: [sqlite]

Re: [sqlite] Complicated join

2016-09-19 Thread David Bicking
This is what I want: SELECT E.CombinedKeyField, E.EvtNbr, M.EvtNbr; A  1  1 A  2  1 A  3  1 A  4  1 A  5  5  -- matches the (A,5) record in the M table. A  6  1 A  7  1 A  8  1 A  9  1 B  1  NULL  -- no match found for CombinedKeyfield in M Did this part of my post not make it to your reader?

Re: [sqlite] Complicated join

2016-09-19 Thread Luuk
On 19-09-16 19:33, David Bicking wrote: select E.CombinedKeyField, E.EvtNbr, M.EvtNbr from E left join M on E.CombinedKeyField = M.CombinedKeyField and (E.EvtNbr = M.EvtNbr or M.EvtNbr = (SELECT MIN(M1.EvtNbr) FROM M M1 WHERE M1.CombinedKeyField = E.CombinedKeyField

Re: [sqlite] Complicated join

2016-09-19 Thread David Raymond
Something that works, but is ugly so I hesitate to post it. Again, working with the results of a simpler query outside of SQL would be preferred. Just because you make ASCII-art of the Mandelbrot set using SQL doesn't mean it's the best choice. (Would that now be UTF-8-art? Doesn't have quite

Re: [sqlite] Complicated join

2016-09-19 Thread David Bicking
Thanks. Yeah, sometimes I hate SQL. Some of my queries for this project take 2 or 3 pages of paper to print out. Unfortunately the only alternatives approved by the bosses are even worse. I think I can add the Not exists clause to my query and that should do it. Which means I need to load the

Re: [sqlite] Complicated join

2016-09-19 Thread Luuk
On 19-09-16 19:33, David Bicking wrote: INSERT INTO M (CombinedKeyField, EvtNbr) VALUES ('A', 1), ('A', 5); INSERT INTO E (CombineKeyField, EvtNbr) VALUES ('A', 1) , ('A', 2) , ('A', 3) , ('A', 4) , ('A', 5) , ('A', 6) , ('A', 7) , ('A', 8) , ('A', 9) , ('B', 1); What is the name of this

[sqlite] What are the correct bind parameters for empty string

2016-09-19 Thread Robert E. Pappenhagen
I have a table with a not null column... Some of the values are empty string and some have more lengthy values :-) I prepare a statement ("Select col2 from table where column = ?") and then use bind to that parameter what are the parameters ? From slq browser I can "Select col2 from table

Re: [sqlite] What are the correct bind parameters for empty string

2016-09-19 Thread Richard Hipp
On 9/19/16, Robert E. Pappenhagen wrote: > I have a table with a not null column... > > Some of the values are empty string and some have more lengthy values :-) > > I prepare a statement ("Select col2 from table where column = ?") and then > use bind to that

[sqlite] sqlite3_bind_text with empty sting....

2016-09-19 Thread Mr Bob
I have a table with a not null column... Some of the values are empty string and some have more lengthy values :-) I prepare a statement ("Select col2 from table where column = ?") and then use bind to that parameter what are the parameters ? From slq browser I can "Select col2 from