I just thought of what may be a simpler solution.
I'm assuming that there is a certain limit to the length of the books
(positions can be safely assumed to never exceed say, 100,000)
So what can be done is
update page set position=position + 10 where position>='3';
insert into page(book,pos
I just thought of what may be a simpler solution.
I'm assuming that there is a certain limit to the length of the books
(positions can be safely assumed to never exceed say, 100,000)
So what can be done is
update page set position=position + 10 where position>='3';
insert into page(book,pos
Cancel that, apparently that only updates the last record...
-Original Message-
From: John McKown
To: General Discussion of SQLite Database
Sent: Mon, Dec 8, 2014 9:18 am
Subject: Re: [sqlite] sqlite bugreport : unique index causes valid updates to
fail
On Mon, Dec 8, 2014 at
Might have another work around.
update page set position=position + 1 where designation=(select designation
from page where book='1' order by position desc)
and then insert your page.
Please see if that'll work. I tested it, but your results may differ.
-Original Message-
Fr
of SQLite Database
Sent: Mon, Dec 8, 2014 8:40 am
Subject: Re: [sqlite] sqlite bugreport : unique index causes valid updates to
fail
J T,
I did provide a sequence of queries that reliably reproduce the issue (see
below, from the first CREATE to the last UPDATE). There is no trigger involved,
That should have been "trigger occur before...", pardon.
-Original Message-
From: Richard Hipp
To: General Discussion of SQLite Database
Sent: Mon, Dec 8, 2014 8:14 am
Subject: Re: [sqlite] sqlite bugreport : unique index causes valid updates to
fail
On Mon, Dec 8, 2014 at 4:5
Try having your cascade occur before the row is created, updated or deleted.
http://www.sqlite.org/lang_createtrigger.html
-Original Message-
From: Richard Hipp
To: General Discussion of SQLite Database
Sent: Mon, Dec 8, 2014 8:14 am
Subject: Re: [sqlite] sqlite bugreport : uni
The questions you have to ask is
Are the rows I'm returning identifiable by a unique id -- typically the row id,
but also unique identifiers, like ISBN for books, Employee ID for employees,
etc. If you find duplicates of what should be a unique id in a table then its
probably a sign the data is
Dominique,
Why not get a column count (datareader.fieldcount (C#) or
cursor.getColumnCount() (Java/Android))?
>From there you should be able to simply do a
try {
str = getString(columnIndex);
checkValue(str);
}
catch(Exception e) {
// wasn't a string or the check (and replace)
9 matches
Mail list logo