I have a procedure which needs the date passed to it as an IN parameter.
when I run it manually it works fine
e.g exec test ('02-SEP-2002')
How can I automate this in order to get the IN parameter for yesterdays date, generated automatically.
Thanks in advance.
do I need to change the proc, or can I use DBMS_JOB with the format you give!
Thanks in advance
Let's say you wan't the procedure TEST() to be run every day at 8:00AM by DBMS_JOB. You would submit such a job with something like:
(job => x,
what => 'test(trunc(sysdate)-1)',
next_date => trunc(sysdate) + 8/24,
interval => 'trunc(sysdate) + 8/24 + 1'