SQLite User Forum

sqlite3 Browser unwarranted syntax error defining trigger
Login

sqlite3 Browser unwarranted syntax error defining trigger

(1) By anonymous on 2022-07-16 15:13:30 [source]

SQLite Browser Version 3.10.
Qt Version 5.9.3
SQLite Version 3.21.0

The following trigger definition:


CREATE TRIGGER DNCUpdt
 AFTER UPDATE ON DoNotCalls
  BEGIN
  INSERT INTO DNCLog 
   VALUES('$TODAY',
   'DoNotCalls updated.') ;
  END;
issues the following unwarranted error message:

incomplete input: CREATE TRIGGER DNCUpdt
 AFTER UPDATE ON DoNotCalls
  BEGIN
  INSERT INTO DNCLog
   VALUES('$TODAY',
   'DoNotCalls updated.')

(2) By Stephan Beal (stephan) on 2022-07-16 15:30:05 in reply to 1 [link] [source]

SQLite Browser Version 3.10.

That's a 3rd-party product not maintained by this project. You'll need to contact them about it.

SQLite Version 3.21.0

That version is almost 5 years old. When posting problems about sqlite here, the first response you'll almost always get is "please try with a newer version."

(3) By anonymous on 2022-07-16 23:00:18 in reply to 1 [link] [source]

Have you tried without the first semicolon of the two you have included?

(4) By Larry Brasfield (larrybr) on 2022-07-16 23:14:21 in reply to 3 [link] [source]

Modern versions of the SQLite library are fine with the OP's syntax. See the CREATE TRIGGER syntax diagram.