We’ve found a bug where creating indexes on expressions causes a query to give
incorrect results. Our indexes use some complex custom functions, but the bug
is easy to reproduce just using the ‘abs’ function:
SELECT * FROM docs WHERE abs(a)=2 OR abs(b)=9
After indexing ‘abs(a)’ and ‘abs(b
On 13 Dec 2018, at 10:39pm, Roman Fleysher
wrote:
> UPDATE table1 SET t = t + 8000;
>
>
> Error: UNIQUE constraint failed: table1.t
This means there's an actual example where one value for t is 8000 greater than
another. Use a larger constant.
Simon.
__
Thank you, Keith, for suggestion.
The "t" is time index, with respect to the start of a clock. Since clock can
only move forward, it is unique. I need to shift the start of the clock
My clock is on raster of 10 milliseconds, so are the shifts. Thus I can use
your method to shift twice: by
You cannot do that. The PRIMARY KEY is required to be unique at each "step"
along the way, especially as this is the parent in a foreign key relationship.
Letting alone why anyone would want to do such a thing (which is beyond my
ken), you simply have to make sure that your values are unique.
-Original Message-
From: sqlite-users On Behalf
Of Roman Fleysher
Sent: Thursday, December 13, 2018 2:29 PM
To: SQLite mailing list
Subject: Re: [sqlite] Grouping guidance
> Hypothesis can never be proven. It can only be rejected with data
> contradicting it at hand.
>
> "..the quickest
Dear SQLiters,
I would like to update a column declared as INTEGER PRIMARY KEY. This column is
parent to a column of another table:
table1 ( t INTEGER PRIMARY KEY NOT NULL);
table2 (t INTEGER PRIMARY KEY NOT NULL REFERENCES table1(t) ON DELETE CASCADE
ON UPDATE CASCADE);
I keep PRAGMA foreign
Hypothesis can never be proven. It can only be rejected with data contradicting
it at hand.
"..the quickest way ..." implies someone else corrects you.
From: sqlite-users [sqlite-users-boun...@mailinglists.sqlite.org] on behalf of
Don V Nielsen [donvnie
Two thumbs up on Igor. They say the quickest way to the correct answer is
to post the wrong answer on the internet. Hypothesis just proven.
On Thu, Dec 13, 2018 at 3:00 PM Igor Tandetnik wrote:
> On 12/13/2018 3:41 PM, Igor Tandetnik wrote:
> > On 12/13/2018 3:27 PM, Don V Nielsen wrote:
> >> Ma
On 12/13/2018 3:41 PM, Igor Tandetnik wrote:
On 12/13/2018 3:27 PM, Don V Nielsen wrote:
Making a mountain out of a mole hill, but isn't the solution more complex
that that? The description has to be Foo & Bar. But if given the following,
then the simple answer dies.
select Request from MyTabl
On 12/13/2018 3:27 PM, Don V Nielsen wrote:
Making a mountain out of a mole hill, but isn't the solution more complex
that that? The description has to be Foo & Bar. But if given the following,
then the simple answer dies.
select Request from MyTable group by Request
having sum(Description='Foo
Making a mountain out of a mole hill, but isn't the solution more complex
that that? The description has to be Foo & Bar. But if given the following,
then the simple answer dies.
create table requests (request,task,description);
insert into requests values
('REQ0090887','TASK0236753','Foo'),
(
-Original Message-
From: sqlite-users On Behalf
Of Igor Tandetnik
Sent: Thursday, December 13, 2018 12:16 PM
To: sqlite-users@mailinglists.sqlite.org
Subject: Re: [sqlite] Grouping guidance
> select Request from MyTable group by Request having count(distinct
> Description) = 2
Nice, I ma
On 12/13/2018 1:58 PM, Joseph L. Casale wrote:
I have data that resembles the following:
Request NumberDescription
REQ0090887 TASK0236753 Foo
REQ0090887 TASK0234920 Bar
REQ0090887 TASK0234921 Bar
REQ0090887 TASK0237261 Foo
REQ0086880 TASK0224045 Foo
REQ0086903 TA
Hi,
I have data that resembles the following:
Request NumberDescription
REQ0090887 TASK0236753 Foo
REQ0090887 TASK0234920 Bar
REQ0090887 TASK0234921 Bar
REQ0090887 TASK0237261 Foo
REQ0086880 TASK0224045 Foo
REQ0086903 TASK0224555 Bar
REQ0086990 TASK0223977 Bar
R
> On Dec 13, 2018, at 5:13 AM, Dan Kennedy wrote:
>
> The expression 'dog' also has no affinity (I think you're mistaken as to the
> rules - but please correct me if that's not the case)
You’re right — a literal has no affinity according to section 3.2. That
surprised me.
Thanks for the ans
On 13 Dec 2018, at 2:57pm, Carlo capaldo wrote:
> UPDATE folder
>
>SET Folder_Path = 'E:\Photos'
>
> would change the directory references in all existing 16 rows currently
> containing Folder_Path references to the wrong locations to the correct
> location ‘E:\Photos’ however this also g
On Fri, Nov 30, 2018 at 3:15 PM Dominique Devienne
wrote:
> sqlite> .header on
> sqlite> create table t (c, n);
> sqlite> insert into t values (1, 'one'), (2, 'two'), (3, 'three');
> sqlite> select n from t where c in (select value from json_each('[1, 3]'));
> n
> one
> three
Very nice! Now I c
You need to have SQLITE_ENABLE_DBPAGE_VTAB defined when compiling sqlite3.c ...
otherwise the btreeinfo extension will not work.
I append btreeinfo.c (and a whole pile of other .c files) to the end of
sqlite3.c and also append the following at the very end:
#ifdef USE_NUNICODE
extern void* sq
Hi there,
I have db with table as
CREATE TABLE GasStats10s(GasStats10s_MaxValue REAL,GasStats10s_IntervalDuration
INTEGER,GasStats10s_DataCount INTEGER,GasStats10s_MinValue
REAL,GasStats10s_Value REAL,GasStats10s_DateTime INTEGER,GasStats10s_Source
UID,GasStats10s_Sum REAL,Class UID,DeleteLog
Simon, thank you for your reply.
Unfortunately as a novice I’m still struggling to find a construct that will do
what I want.
Reading the on-line SQLite guide to the UPDATE statement:
“If the UPDATE statement does not have a WHERE clause, all rows in the table
are modified by the UPDATE.”
On 12/13/2018 07:41 AM, Jens Alfke wrote:
Consider CREATE INDEX foo_idx ON tbl (myfunction(a)); where
‘myfunction’ is a deterministic C function I’ve registered with the
SQLite connection (and ‘a’ is a column of ‘tbl’ of course.)
SQLite has no idea what data type(s) ‘myfunction’ returns, and it
And how do you compile sqlite so it has the extension? The error I posted
was actually with a loaded db, so that's not it.
I must be compiling or loading the extension wrong somehow. Also, I saw
that it requires sqlite_db[vtab? not sure] and that table is also missing
Wout.
On Thu, Dec 13, 2018
22 matches
Mail list logo