On 10 Sep 2019, at 2:09am, Rael Bauer <[email protected]> wrote:

> CREATE TRIGGER notes_ai AFTER INSERT ON notes
> BEGIN
>   update notebooks set notebooks.last_edit = datetime('now')
>   where notebooks.id = new.notebook_id;
> END;
> 
> SQLite Expert reports a near ".": syntax error. Is there something wrong with 
> the trigger syntax here, or is it some other problem?

Some of the dots aren't needed.  So try

CREATE TRIGGER notes_ai AFTER INSERT ON notes
BEGIN
  update notebooks set last_edit = datetime('now')
      where id = new.notebook_id;
END;
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to