On 9/6/2013 8:50 AM, Marc L. Allen wrote:
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
I've used this system many times to avoid conflicts, but it may not work where
the table needs to be accessed concurrently, as rows will sort of disappear
temporarily (or at least change to an unusable state).
Well, that's exactly what transactions are there for.
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users