1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

ora 04091

Discussion in 'General' started by monkey, Apr 23, 2014.

  1. monkey

    monkey Long Term Member

    Messages:
    156
    Likes Received:
    0
    Trophy Points:
    230
    mutating table

    Hello!
    When i tried with:

    Code (Text):
    create trigger t1 after update of msurname on m when (odl.idm=1)
    begin
    update m
    set mname='trigger1'
    where idm=1;
    end t1;
     
    shor errors trigger t1 said no errors, but in other sql file with:
    Code (Text):

    update m
    set msurname='Updated';
     
    got error

    ora 04091

    But when i did it like:
    Code (Text):
    create trigger t1 after update of msurname on m when (odl.idm=1)
    begin
    update m
    set new.mname='trigger1'
    where idm=1;
    end t1;
    then I got error (under : show errror trigger t1) ora -00904 "new"."mname" invalid identifier.

    Please, what to do?
    Many thanks!!!
     
  2. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
    You read responses to the placed subjects?
    It isn't necessary to publish subjects in which you repeat the same error.

    you need to implement audit of data, i.e. who and when changed record?

    Mutating Table Exceptions
     
  3. jagadekara

    jagadekara Forum Guru

    Messages:
    1,126
    Likes Received:
    145
    Trophy Points:
    1,805
    Location:
    Pulivendula
    HI,

    here u should remove new.