On 6/8/2013 2:51 PM, Dave Wellman wrote:
update t1 from (select c1,c2 from t1) as dt1
set c2 = dt1.c2
where t1.c1 = dt1.c2 - 1;

update t1 set c2 = coalesce((select c2 from t1 dt1 where t1.c1 = dt1.c2 - 1), c2);

--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to