On 10/14/2013 11:36 AM, Gert Van Assche wrote:
my table contains a boolean SubGroup field that is set to 0 by default. I would like to update it so that for instance 100 of the 1000 records are randomly set to 1. Is this something that can be done using an SQL instruction?
Try something like this: update MyTable set SubGroup=1 where rowid in ( select rowid from MyTable order by random() limit 100 ); -- Igor Tandetnik _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

