Have create a trigger like this:
create trigger AICC_core_del delete on AICC_core
begin
delete from AICC_objectives_status where session_id=old.session_id;
delete from AICC_comments where session_id=old.session_id;
delete from AICC_interactions where session_id=old.session_id;
delete from AICC_student_data where session_id=old.session_id;
delete from AICC_student_preferences where session_id=old.session_id;
delete from AICC_student_preferences_1 where session_id=old.session_id;
delete from AICC_core_detail where session_id=old.session_id;
end
;
But get the following exception:
08:03:46.046 create trigger AICC_core_del delete on AICC_core begin
delete from AICC_objectives_status where session_id=old.session_id
08:03:47.047 SQLite.Exception: near "session_id": syntax error
08:03:47.047 delete from AICC_comments where session_id=old.session_id
08:03:47.047 SQLite.Exception: no such column: old.session_id
08:03:47.047 delete from AICC_interactions where session_id=old.session_id
08:03:47.047 SQLite.Exception: no such column: old.session_id
08:03:47.047 delete from AICC_student_data where session_id=old.session_id
08:03:47.047 SQLite.Exception: no such column: old.session_id
08:03:47.047 delete from AICC_student_preferences where
session_id=old.session_id
08:03:47.047 SQLite.Exception: no such column: old.session_id
08:03:47.047 delete from AICC_student_preferences_1 where
session_id=old.session_id
08:03:47.047 SQLite.Exception: no such column: old.session_id
08:03:47.047 delete from AICC_core_detail where session_id=old.session_id
08:03:47.047 SQLite.Exception: no such column: old.session_id
08:03:47.047 end
08:03:47.047 SQLite.Exception: cannot commit - no transaction is active
Anyone know how to solve.... the manual tell that the old is a valid
reference in delete event... but see it is not?