Go to the FreeLists Home Page Home Signup Help Login
 



Browse oracle-l: This Month's ArchiveMain Archive PageRelated postsPrevious by DateNext by Date

Re: Can we do this: Populate a variable inside a trigger?

  • From: Bjørn Dörr Jensen <B.D.Jensen@xxxxxxx>
  • To: <johan.muller@xxxxxxxxx>
  • Date: Sat, 2 Sep 2006 00:24:45 +0200
Hi!
Whats wrong with stored procedures?
You should be able to put your script in an package...
/Bjoern
  ----- Original Message ----- 
  From: Johan Muller 
  To: oracle-l-bounce@xxxxxxxxxxxxx ; Oracle L (E-mail) 
  Sent: Friday, September 01, 2006 10:08 PM
  Subject: Can we do this: Populate a variable inside a trigger?


  CREATE OR REPLACE TRIGGER features_tbl_au AFTER UPDATE ON features_tbl 
REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW DECLARE
      v_file VARCHAR2(1024);
  BEGIN
      IF (:NEW.enabled = 1 AND :OLD.enabled = 0) THEN
          v_file := '/vobs/NMS/nms/sql/nms_security/' || :NEW.name;
          @@v_file;
      END IF;
  EXCEPTION
      WHEN DUP_VAL_ON_INDEX THEN
          NULL; -- script has already been run so just ignore this type of 
error 
      WHEN OTHERS THEN
          RAISE;
  END;
  /

  SP2-0310: unable to open file "v_file.sql"

  Is there a way to execute the script - the trigger will not pass the v_file 
variable to complete : NEW.name variable.

Other related posts:

  • Can we do this: Populate a variable inside a trigger?
  • Re: Can we do this: Populate a variable inside a trigger?




  • [ Home | Signup | Help | Login | Archives | Lists ]

    All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
    Everything else ©2008 Avenir Technologies, LLC.