Ejecutar procedimiento desde un trigger

peru2002
26 de Febrero del 2004
tengo un trigger mediante el cual necesito llamar a un procedimiento

maverick2kevolution
26 de Febrero del 2004
Hola:
esto fue sacado de la documentacion de Oracle 9i (9.2)

Calling a Procedure in a Trigger Body: Example
You could create the salary_check trigger described in the preceding example by calling a procedure instead of providing the trigger body in a PL/SQL block. Assume you have defined a procedure hr.salary_check, which verifies that an employee's salary is in an appropriate range. Then you could create the trigger salary_check as follows:

CREATE TRIGGER hr.salary_check
BEFORE INSERT OR UPDATE OF salary, job_id ON hr.employees
FOR EACH ROW
WHEN (new.job_id <> 'AD_VP')
CALL check_sal(:new.job_id, :new.salary, :new.last_name);


The procedure check_sal could be implemented in PL/SQL, C, or Java. Also, you can specify :OLD values in the CALL clause instead of :NEW values.

Buena suerte.......

maverick2kevolution
26 de Febrero del 2004
www.comunidad-oracle.tk

paciencia el servidor anda mas o menos no mas ...