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
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
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
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-
eneral Discussion of SQLite Database <sqlite-users@sqlite.org>
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
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
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
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
8 matches
Mail list logo