Skip to content

Cannot create TRIGGER as shown in SQLite Example #1470

@kwasmich

Description

@kwasmich

Details for the issue

What did you do?

I tried to create a trigger on an existing database. But without success. So instead I went over to sqlite.org and tried the examples.

The executed lines are:

CREATE TABLE customer( cust_id INTEGER PRIMARY KEY, cust_name TEXT, cust_addr TEXT);
CREATE VIEW customer_address AS SELECT cust_id, cust_addr FROM customer;
CREATE TRIGGER cust_addr_chng INSTEAD OF UPDATE OF cust_addr ON customer_address BEGIN UPDATE customer SET cust_addr=NEW.cust_addr WHERE cust_id=NEW.cust_id; END;

And it fails on the last line.

What did you expect to see?

I expected to execute the sample code and thus successfully create a trigger.

What did you see instead?

incomplete input: CREATE TRIGGER cust_addr_chng INSTEAD OF UPDATE OF cust_addr ON customer_address BEGIN UPDATE customer SET cust_addr=NEW.cust_addr WHERE cust_id=NEW.cust_id

Useful extra information

The three statements execute successfully in the sqlite3 command line tool which is 3.24.0 2018-06-04 19:24:41 c7ee0833225bfd8c5ec2f9bf62b97c4e04d03bd9566366d5221ac8fb199a87ca.

What operating system are you using?

  • Windows: ( version: ___ )
  • Linux: ( distro: ___ )
  • Mac OS: ( 10.11.6 )
  • Other: ___

What is your DB4S version?

  • 3.10.1
  • 3.10.0
  • 3.9.1
  • Other: ___

Did you also

Metadata

Metadata

Assignees

Labels

bugConfirmed bugs or reports that are very likely to be bugs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions