On 10/25/2011 10:59 AM, Sébastien Escudier wrote:

Hello,

I used to do something like this on older sqlite versions :
(this does not really makes sense here, but this is a simplified)
CREATE VIEW my_view AS SELECT table1.type, table2.type FROM table1 INNER
JOIN table2 ON table1.id = table2.id;

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;

Try NEW."table1.type" and NEW."table2.type"
--
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to