Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2007
    Posts
    2

    Question Unanswered: SQL Trigger using Informix database

    I still new in SQL Trigger using Informix database. I really need help from the expert to solve my problem.

    How can I TRIGGER tempTable on new record inserted then insert the new record into actualTable? After that I want to TRIGGER actualTable on new record inserted and delete the same record on tempTable?

    Here is my SQL TRIGGER:

    CREATE TRIGGER t1
    INSERT ON tempTable
    REFERENCING NEW AS original
    FOR EACH ROW WHEN (original.status = 'Y')
    (INSERT INTO actualTable
    (field1,field2,field3,status)VALUES(original.field 1,original.field2,original.field3,original.status) );


    CREATE TRIGGER t2
    INSERT ON actualTable
    REFERENCING NEW AS original
    FOR EACH ROW WHEN (original.status = 'Y')
    (DELETE tempTable WHERE field1=original.field1);

    Here is error found:

    Error: Table or column matches object referenced in triggering statement. (State1000, Native Code: FFFFFD15)

  2. #2
    Join Date
    Dec 2007
    Posts
    2

    Smile Some helpful explanation by Tony

    If anyone facing the same problem as mine, please visit techrepublic for some helpful explanation by Tony...

    http://techrepublic.com.com/5208-623...248859&start=0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •