Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: About DBMS_JOB Package question.

Re: About DBMS_JOB Package question.

From: Andrew Protasov <protasov_at_percombank.kiev.ua>
Date: Tue, 12 May 1998 16:16:42 +0300
Message-ID: <6j9i40$jl1$1@news.lucky.net>


Hi

Decode function can not be used directly in PL/SQL, only in SQL. So, you can not do something like
x:=decode(...);
but you can
select decode(...) from ...;

           Andrew Protasov

lee wrote in message <6j8qap$oc4$1_at_www.clinux.ml.org>...
>I want to implement a Task Schedule,so that a task can started at a
assigned
>time and stoped at another assigned time and During the running,have a
>interval pre 15 minutes,
>The DBMS_JOB provide a procedure
>DBMS_JOB.SUBMIT( job OUT BINARY_INTEGER,
> what IN VARCHAR2,
> next_date IN DATE DEFAULT SYSDATE,
> interval IN VARCHAR2 DEFAULT 'null',
> no_parse IN BOOLEAN DEFAULT FALSE)
>In order to implement my idea,I user the follow statements:"
>StartTime:= starttime;
>EndTime:= endtime;
>Interval:=15;
>DBMS_JOB.SUBMIT(JobNo,
> 'MyProcedure(arg,...)',
> StartTime,
> 'DECODE(ceil(EndTime-SysDate),0,NULL,SysDate+Interval/1440)',false);
>"
>when I try to execute it,have a error as follow:
>"ORA-23319: parameter value
>"DECODE(ceil(EndTime-SysDate),0,NULL,SysDate+Interval/1440)" is not
>appropriate."
>why? the DECODE function only for when ceil(Endtime-SysDate)=0 ,the
>next_date will be NULL,the job will delete itself from Job queue,and if
>not,the next start time assigned with SysDate+Interval/1440(after 15
>minutes).
>
>Any help would be appreciated.
>
>
>
Received on Tue May 12 1998 - 08:16:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US