-
Hi,
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.
-
exec test(trunc(sysdate)-1)
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
DBMS_JOB
exec test(trunc(sysdate)-1)
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:
Code:
declare
x binary_integer;
begin
dbms_job.submit
(job => x,
what => 'test(trunc(sysdate)-1)',
next_date => trunc(sysdate) + 8/24,
interval => 'trunc(sysdate) + 8/24 + 1'
);
commit;
end;
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|