I have a procedure with a varchar input parameter. I'm trying to schedule via dbms_job, but am having problems.
Here's how I scheduled other procedures (without input parameters):
This seems to work correctly (runs it at midnight nightly). Now when trying to schedule a procedure with an input parameter...
...I get the following error:
ORA-06550: line 10, column 35:
PLS-00103: Encountered the symbol "04" when expecting one of the following:
. ( ) , * @ % & | = - + < / > at in mod not range rem => ..
<an exponent (**)> <> or != or ~= >= <= <> and or like
between is null is not || is dangling
The symbol "(" was substituted for "04" to continue.
ORA-06550: line 10, column 45:
PLS-00103: Encountered the symbol "," when expecting one of the following:
) , * & | = - + < / > at in mod not rem => ..
<an exponent (**)> <> or != or ~= >= <= <> and or like as
between from using is null is not || is dangling
ORA-06550: line 10, column 58:
PLS-00103: Encountered the symbol "
); end;" when expecting one of the following:
. ( ) , * @ % & | = - + < / > at in mod not rem => ..
<an exponent (**)> <> or != or ~= >= <= <> and or like
between is null is not || is danglin
ORA-06550: line 12, column 26:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
. ( ) , * % & | = - + < / > at in mod not range rem
I'm using the
"myprocedure to_date('04/01/2002','MM/DD/YYYY')" logic b/c when I execute the procedure in SQL*Plus, I type...
...which executes correctly.
Any thoughts on how to code the desired input parameter when scheduling via dbms_job? Is it just a syntax problem? One thing that worries me is that I've done alot of research but haven't found even one example of someone scheduling a job that requires an input parameter. Is it even possible? I would think that it has to be possible, but...
Thanks for your input.
Here's how I scheduled other procedures (without input parameters):
Code:
DECLARE
job_no NUMBER;
BEGIN
DBMS_JOB.SUBMIT
(job_no
,'begin myprocedure; end;'
,TRUNC(SYSDATE + 1)
,'TRUNC(SYSDATE + 1)');
COMMIT;
END;
Code:
DECLARE
job_no NUMBER;
BEGIN
DBMS_JOB.SUBMIT
(job_no
,'begin myprocedure to_date('04/01/2002','MM/DD/YYYY'); end;'
,TRUNC(SYSDATE + 1)
,'TRUNC(SYSDATE + 1)');
COMMIT;
END;
ORA-06550: line 10, column 35:
PLS-00103: Encountered the symbol "04" when expecting one of the following:
. ( ) , * @ % & | = - + < / > at in mod not range rem => ..
<an exponent (**)> <> or != or ~= >= <= <> and or like
between is null is not || is dangling
The symbol "(" was substituted for "04" to continue.
ORA-06550: line 10, column 45:
PLS-00103: Encountered the symbol "," when expecting one of the following:
) , * & | = - + < / > at in mod not rem => ..
<an exponent (**)> <> or != or ~= >= <= <> and or like as
between from using is null is not || is dangling
ORA-06550: line 10, column 58:
PLS-00103: Encountered the symbol "
. ( ) , * @ % & | = - + < / > at in mod not rem => ..
<an exponent (**)> <> or != or ~= >= <= <> and or like
between is null is not || is danglin
ORA-06550: line 12, column 26:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
. ( ) , * % & | = - + < / > at in mod not range rem
I'm using the
"myprocedure to_date('04/01/2002','MM/DD/YYYY')" logic b/c when I execute the procedure in SQL*Plus, I type...
Code:
SQL> exec myprocedure to_date('04/01/2002','MM/DD/YYYY')
Any thoughts on how to code the desired input parameter when scheduling via dbms_job? Is it just a syntax problem? One thing that worries me is that I've done alot of research but haven't found even one example of someone scheduling a job that requires an input parameter. Is it even possible? I would think that it has to be possible, but...
Thanks for your input.