Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please help...triggers issue

 
Aman Gupta
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a requirement of a trigger which will trim the value of column CAA_NAME as soon as this column is updated.
I hv written the foll trigger to achieve the same.

But after the trigger is configured and i try to update caa_name column, I'm getting -

ora-04091: table caa_ca is mutating,trigger-function may not see it
ora-06512: at "TRIMCAACC4_MAIN", line 2
ora-04088: error during execution of trigger


Please Help.



CREATE OR REPLACE TRIGGER TRIMCAACC4_MAIN
AFTER UPDATE OF
CAA_NAME
ON
CAA_CA
REFERENCING NEW AS NEW
FOR EACH ROW
BEGIN
UPDATE CAA_CA SET
CAA_NAME = TRIM(:NEW.CAA_NAME)
WHERE CAA_CA_ID=:NEW.CAA_CA_ID ;

END;
 
Scott Selikoff
author
Saloon Keeper
Posts: 4028
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read this: http://asktom.oracle.com/tkyte/Mutate/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic