DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: help in delete trigger

  1. #1
    Join Date
    Nov 1999
    Posts
    226
    Hi

    I get a trigger mutation

    create or replace trigger RF_TEST_SHIPTO
    before delete on SHIPTO
    for each row
    begin
    if :old.STSTAT <>'P'
    THEN
    insert into TEST_SHIPTO select * from shipto;
    end if;
    end ;
    /

    Let me know

    thanks

  2. #2
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    You can't insert a row in the DELET trigger. Better handle it in application. Or you need to create a view, and then insert it.

  3. #3
    Join Date
    Oct 2000
    Posts
    123
    You can reference greate solution on the following website:

    [url]http://osi.oracle.com/wa/ask/owa/ask_tom_pkg.main[/url], then

    search by mutate table or so, there you go.

    Take care

  4. #4
    Join Date
    Aug 2000
    Posts
    462
    The best way to handle these situations is to create a package. Within the package, create a table of records and two triggers: a row trigger and an "after" statement trigger. Record the data being deleted into the table of records during the row trigger processing then manipulate the database as needed in the statement trigger using the table of records. Thus no table access occurs during mutation.

Posting Permissions

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


Click Here to Expand Forum to Full Width