Without the schema, it's difficult to say where the problem is.

Check spelling and make sure session_id is a column in AICC_core.

Christian

PS. If you're sure AICC_core has session_id, but don't want to publish
    your schema for any reason, try reproducing the problem with an
    example schema you can publish.


On Wed, 29 Sep 2004, Carfield Yim wrote:

>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?
>

-- 
    /"\
    \ /    ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
     X                           - AGAINST MS ATTACHMENTS
    / \

Reply via email to