On Oct 25, 2011, at 10:59 AM, Sébastien Escudier wrote: > CREATE TRIGGER my_trigger INSTEAD OF INSERT ON my_view > BEGIN > INSERT INTO table1(type) VALUES(NEW.table1.type); > INSERT INTO table2(type) VALUES(NEW.table2.type); > END; > > ... > > Why this syntax does not work anymore ?
You haven't given the view explicit column names, and the ones SQLite3 invents are arbitrary; try this instead: CREATE VIEW my_view AS SELECT table1.type as table1_type, table2.type as table2_type FROM … CREATE TRIGGER my_trigger INSTEAD OF INSERT ON my_view BEGIN INSERT INTO table1(type) VALUES(NEW.table1_type); INSERT INTO table2(type) VALUES(NEW.table2_type); END; e _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users