On Thu, 11 Jun 2009 20:17:59 +0200, Frank Naude <naud...@telkomsa.net> wrote:
>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" - syntax error: HY000 > >Does sqlite support inline views/ derived tables within UPDATE >statements? Any suggestions on how to get it to work? Not directly, but you can update "the tables behind" a view with an INSTEAD OF trigger. The trigger can contain any update statement you like. http://www.sqlite.org/lang_createtrigger.html#instead_of_trigger >Best regards. > >Frank -- ( Kees Nuyt ) c[_] _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users