Hi,
CREATE TABLE [notebooks] (
[id] INTEGER,
[last_edit] DATETIME);
CREATE TABLE [notes](
[id] INTEGER,
[caption] VARCHAR,
[notebook_id] INTEGER);
When a new note is added, I want to update the "last_edit" field for the
notebook that this note belongs to.
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?
Thanks
Rael
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users