Help needed in Scheduling a parameterized procedure [message #181339] |
Sat, 08 July 2006 17:34 |
grk28
Messages: 38 Registered: June 2006
|
Member |
|
|
Hi Frnds,
I am facing a problem in scheduling jobs which is as follows:
I'm having a procedure which is having a date parameter,i want this procedure to be executed everyday at midnight.
i am trying the following but it is failing
HERE IS THE SAMPLE PROCEDURE I AM USING
/* Formatted on 2006/07/09 04:01 (Formatter Plus v4.8.7) */
CREATE OR REPLACE PROCEDURE insert_into_a (p_date VARCHAR2)
AS
BEGIN
INSERT INTO a
VALUES (TO_DATE(p_date,'MM/DD/YYYY'));
COMMIT;
END insert_into_a;
/
DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'INSERT_INTO_A('''07/09/2006'');'
,next_date => to_date('07/10/2006 03:21:00','dd/mm/yyyy hh24:mi:ss')
,interval => 'sysdate+1'
,no_parse => TRUE
);
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
END;
/
Can we put parameterized procedures in the job ??
If yes please give me an example.
Thanks in Advance,
RK.
|
|
|
|