简体   繁体   中英

Oracle trigger to call Stored Procedure

I have an SP that needs to be called by an "after update" trigger. This Sp writes out a document to the mounted oracle directory for the host application to pick up. The SP has the following parameters:

CREATE OR REPLACE test_sp_mbinfo
(out_status OUT VARCHAR2,
out_dir OUT VARCHAR2,
in_contract IN VARCHAR2)

The in_contract parameter would be sent in by the triggering event. The trigger code i have so far that i have a hard time compiling is:

CREATE OR REPLACE TRIGGER mbinfo_trig
AFTER UPDATE OF tsta_cncontst ON kndtsta
FOR EACH ROW

BEGIN

IF (:new.tsta_cncontst IN ('02','06'))
THEN
 test_sp_mbinfo(:new.tsta_cncclipu);
END IF;

END
;

How do i pass in the 2 out parameters to make the process work?

Thank you!

You could declare two local variables in the trigger and pass those for the OUT parameter. The question then becomes whether you care about the returned values, and if so what to do with them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM