On Fri, Sep 6, 2013 at 2:50 PM, Marc L. Allen
<mlal...@outsitenetworks.com>wrote:

> No one commented on my second thread (written after I actually understood
> the problem!).
>
> But, I proposed a two update sequence to do it.
>
> UPDATE table SET Sequence = -(Sequence + 1) WHERE Sequence >=
> seq_to_insert AND Name = name_to_insert
> UPDATE table SET Sequence = -Sequence WHERE Sequence < 0  AND Name =
> name_to_insert
>

Because, no offense, that's just a work-around.

The question that matters is whether SQL requires the UPDATE statement to
succeed or not, despite a given implementation possibly having to deal with
transient index violations while processing the rows.

If so, SQLite would be non-compliant in that regard, as of now.
If not, and implementations are free to support or not such UPDATE
statements, then SQLite would ideally document this limitation, since it
departs from major DBMS's like Oracle.

Myself, if I'm "thinking in sets", all implementation details aside, the
UPDATE statement looks fine and correct, and I'd have expected SQLite to
support it.

But I'm just waiting to read Dr. Hipp's own read on this now. --DD
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to