Hello,

I've tried to create this trigger:

----------------------------------------------------------
CREATE TRIGGER log_DELETE_staff
                        AFTER DELETE ON staff FOR EACH ROW
                        BEGIN
                                INSERT INTO
xlog_staff(idOLD,id_staff_editorNEW,id_staff_editorOLD,codeOLD,forenameOLD,
nameOLD,sqlaction)VALUES(old.id,(SELECT id FROM
temp.user_signed_in),old.id_staff_editor,old.code,old.forename,old.name,'D');
                        END;

----------------------------------------------------------

but get

SQLite Error 1 - trigger log_DELETE_staff cannot refrence objects in
database temp

as an error message - but I can only find that "the table to be modified must
exist in the same database as the table or view to which the trigger is
attached". In this case this is completely true because only part of the source
"(SELECT id FROM temp.user_signed_in)" is in another database.

Oliver



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

Reply via email to