On 1 Apr 2012, at 2:24pm, Igor Tandetnik <itandet...@mvps.org> wrote:

> Simon Slavin <slav...@bigfraud.org> wrote:
>> On 1 Apr 2012, at 2:09pm, Baruch Burstein <bmburst...@gmail.com> wrote:
>> 
>>> update table1 t1
>>>   set col1 = col1 * 2
>>>   where col1 <= (select avg(col1)
>>>                    from table1
>>>                    where col2=t1.col2);
>> 
>> Can this be done with a JOIN instead of a sub-SELECT ?
> 
> If only SQLite allowed joins in an UPDATE statement.

D'oh.  Forgot this was SQLite.  Thanks to you and Abeille.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to