[sqlite] Use of same aliases in single query

2020-03-23 Thread Rob Golsteijn
en though "y" is ambiguous here count()|y|y 2|1|3 -- Looks like the first alias "y" is used. Tested with versions 3.27.2 and 3.15.2. Regards, Rob Golsteijn Met Vriendelijke Groet, Kind Regards, 谨致问候, Rob --- Rob Golsteijn     Software Engineer     Mapscape Luchtha

[sqlite] Documentation issues for collating sequences

2020-01-08 Thread Rob Golsteijn
alue * const). Can anyone explain why the values are passed as strings. E.g. were collating sequences only foreseen for text values? Regards, Rob Golsteijn ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Query planner improvements in case of AUTOMATIC INDEX

2018-09-19 Thread Rob Golsteijn
le for the cases the query plan cannot be improved. For our company it would be acceptable but in general I cannot judge. Regards, Rob Golsteijn ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/

[sqlite] Error: ambiguous column name

2017-11-14 Thread Rob Golsteijn
rkaround: add an alias for one of the tables in the join (both columns will be called "a"). Met Vriendelijke Groet, Kind Regards, 谨致问候, Rob Golsteijn ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] documentation flaws

2017-06-02 Thread Rob Golsteijn
gset" should be "changeset" in first line of Section "2.2. Conflicts" on page http://sqlite.org/sessionintro.html <http://sqlite.org/sessionintro.html> Met Vriendelijke Groet, Kind Regards, 谨致问候, Rob Golsteijn ___ sqlite-us

[sqlite] Error using multiline command line argument with dot-command

2017-03-07 Thread Rob Golsteijn
. Example: Passing statements via stdin works fine: echo "SELECT 1; .mode csv SELECT 1;" | sqlite3 mydb.sq3 (no error) Passing the statements via a command line argument gives an error: sqlite3 mydb.sq3 "SELECT 1; .mode csv SELECT 1;" Error: near ".": syntax e

Re: [sqlite] no such column error

2016-10-27 Thread Rob Golsteijn
not know mytable.myfield2 in my simplified query? Or is this a bug? Regards, Rob Golsteijn UPDATE mytable SET myfield1 = (SELECT 1 from mytable ORDER BY EXISTS (SELECT 1 WHERE mytable.myfield2 = 1

[sqlite] no such column error

2016-10-25 Thread Rob Golsteijn
   WHERE mytable.myfield2 =1 )   ); Error: no such column: mytable.myfield2 Tested with sqlite versions 3.8.4.3,  3.8.8.2,   3.11.1 and 3.15.0 (latest). Met Vriendelijke Groet, Kind Regards, Rob Golsteijn

Re: [sqlite] builtin functions and strings with embedded nul characters

2016-07-04 Thread Rob Golsteijn
ength for our C string using the C API. After we found our bug I did my tests, shown in my original post, using the SQlite command line tool. Rob Golsteijn wrote: > Due to a bug in our own code we inserted a string with embedded nul > character in the database. <http://www.sqlite.

[sqlite] builtin functions and strings with embedded nul characters

2016-07-01 Thread Rob Golsteijn
Hi List, Due to a bug in our own code we inserted a string with embedded nul character in the database. This caused strange behavior when we used the built-in function instr() on this data. As part of the analysis of this issue I investigated how the builtin functions handle strings with

[sqlite] Differences for DELETE with EXISTS

2016-05-03 Thread Rob Golsteijn
be interpreted according to the SQL standard: EXISTS and subqueries should operate on the original (unmodified) tables, not on the (partly) updated table. Met Vriendelijke Groet, Kind Regards, Rob Golsteijn

[sqlite] Differences for DELETE with EXISTS

2016-05-02 Thread Rob Golsteijn
Hi List, I observe a difference in results of a DELETE query using the EXISTS operator between Sqlite version 3.8.11.1 and 3.9.0. After executing DELETE the number of remaining rows in the table differs. I can't figure out if this is regression, an improvement, or that the behavior is just

Re: [sqlite] Non-optimal query plan

2014-09-25 Thread Rob Golsteijn
>> Hi List, >> >> I was looking at the query plan of a rather simple query, but I don't >> understand why sqlite would choose this query plan. >> >> ...I was surprised that sqlite came up with the inferior query plan... >> >> Note: After an "analyze aaa" (on a decently populated table) sqlite

[sqlite] Non-optimal query plan

2014-09-24 Thread Rob Golsteijn
right query plan. Regards, Rob Golsteijn     ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Sequential numbers

2014-06-26 Thread Rob Golsteijn
a.rowid);   select * from aaa; i|seqnr 10|1 20|2 50|3 30|4 20|5   Regards Rob Golsteijn     > Hi all, > >I have some rows in a table (not very many, typically less than 20) and I >want to generate a unique, sequential number for each row. In another dbms >I've used a row_number

Re: [sqlite] shell core dumps on incomplete init file

2014-06-04 Thread Rob Golsteijn
>Dan Kennedy Wed, 04 Jun 2014 03:56:33 -0700 >On 06/04/2014 05:06 PM, Rob Golsteijn wrote: >> Hi List, >> I noticed that the sqlite shell core dumps when it is started with an init >> file that ends with an incomplete statement. >> >> Example:

[sqlite] shell core dumps on incomplete init file

2014-06-04 Thread Rob Golsteijn
ng happens when typing an incomplete sql statement in the shell and then press CTRL-D. Sqlite version is 3.8.4.3.     Regards, Rob Golsteijn     ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Mutally dependent JOIN clauses

2014-01-17 Thread Rob Golsteijn
ON A.a*A.a + B.b*B.b = C.c*c.c JOIN B ON A.a*A.a + B.b*B.b = C.c*c.c; c           a           b --  --  -- 5           3           4 5           4           3 -Urspr?ngliche Nachricht- Von: Rob Golsteijn [mailto:rob.golste...@mapscape.eu] Gesendet: Donnerstag, 1

[sqlite] Mutally dependent JOIN clauses

2014-01-16 Thread Rob Golsteijn
or is this just invalid SQL? In the latter case it would be nice if SqLite complained about it).     Rob Golsteijn   ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] duplicate table aliases

2013-12-10 Thread Rob Golsteijn
); For Examples 1-3  I would expect an error for duplicate table aliases.   Regards, Rob Golsteijn ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] name resolutionn in GROUP BY

2013-08-14 Thread Rob Golsteijn
ing the name of the result row alias looks like a circular definition. My question is whether the change is a bug or an intended change? From the release history's text it looks like it could have been introduced by the changes in Ticket 2500cdb9be05   Regards, Rob Golsteijn     __

Re: [sqlite] Sqlite accepts invalid column names

2013-06-24 Thread Rob Golsteijn
> On Thu, Jun 20, 2013 at 10:26 AM, Rob Golsteijn > <rob.golste...@mapscape.eu>wrote: > > > > > SELECT a.col2, > >b.col2, > >a.b.col2,-- invalid column name > >b.a.col2,-- invalid column name >

[sqlite] Sqlite accepts invalid column names

2013-06-20 Thread Rob Golsteijn
of silently ignore the first part of the column name? Or did I miss something? Regards, Rob Golsteijn     ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Sqlite shell cannot read its own dump file

2013-06-03 Thread Rob Golsteijn
Output: PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE test (r REAL); INSERT INTO "test" VALUES(Inf); INSERT INTO "test" VALUES(-Inf); COMMIT; Error: near line 4: no such column: Inf Error: near line 5: no such column: Inf  

[sqlite] Garbage strings as query output

2010-09-27 Thread Rob Golsteijn
The following code is intended to change text values 'UND'  into NULL values. However, I see that string values different from 'UND' get corrupted. In the example below the value 'ENG' is corrupted and the new  value is a string of three non-printable characters (ascii values 0x03 0x17 0x13) in