QuickDrawMcgraw
QuickDrawMcgraw

Reputation: 83

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!

Upvotes: 0

Views: 133

Answers (1)

Dave Costa
Dave Costa

Reputation: 48111

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.

Upvotes: 3

Related Questions