Re: [sqlite] UPDATE with inline view/ derived table

2009-06-11 Thread Frank Naude
Hi Pavel, On Thu, Jun 11, 2009 at 8:28 PM, Pavel Ivanov wrote: > According to this http://www.sqlite.org/lang_update.html you have > invalid syntax. > I believe you can achieve the same by this (assuming that id is unique > in fud28_thread): > > UPDATE fud28_read > SET

[sqlite] UPDATE with inline view/ derived table

2009-06-11 Thread Frank Naude
Hi, I need some help getting this UPDATE to work with sqlite 3.3.8: UPDATE fud28_read SET user_id=2, msg_id=t.last_post_id, last_view=1244710953 FROM (SELECT id, last_post_id FROM fud28_thread WHERE forum_id=4 AND last_post_date > 0) t WHERE user_id=2 AND thread_id=t.id Error: near "FROM" -