Howto Pass multiple parameters in DBMS_JOB.SUBMIT
oramanDec 19 2011 — edited Dec 19 2011Hi all,
I have a dbms_job from which I would like to call a procedure with multiple parameters (variables and string parameters as well)
I'm not able to parse the values.
(I use dbms_job inside of a trigger to avoid firering the trigger before commit occurs)
CREATE OR REPLACE TRIGGER mytrigger
AFTER insert
ON mytable
FOR EACH ROW
DECLARE
to_email varchar2(255);
v_job number;
BEGIN
select email into to_email from mytable_2 where m_id = :NEW.m_id;
DBMS_JOB.submit
(
v_job,
'myprocedure( '||''from@email.com''||','||to_email||','||''my subject''||','||''This is the test message from oracle server''||');',
sysdate
);
END;
/
I use Oracle 11g.
all the parameters except to_email (variable) are strings. What is the right way to parse it?
any help would be appreciated!