Nikolaus Rath <nikol...@rath.org> wrote: > "Igor Tandetnik" <itandet...@mvps.org> writes: >> Nikolaus Rath <nikol...@rath.org> wrote: >>> I understand that running INSERT or DELETE during an active SELECT query >>> can get me into trouble. But is it safe to run (in pseudocode): >>> >>> for value in "SELECT main_column IN mytable": >>> >>> UPDATE mytable SET other_column='foobar' WHERE main_column=value >> >> It should be safe. Though I don't see how this would be different than >> just updating all rows in a single query: >> >> UPDATE mytable SET other_column='foobar'; > > Well, in the actual code 'foobar' is of course a non-trivial function of > value.
See if you can implement it as a custom function (see sqlite3_create_function), then do UPDATE mytable SET other_column=foobar(main_column); -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users