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: Access to DBMS_JOB Interval Parser?

Re: Access to DBMS_JOB Interval Parser?

From: s.kapitza <skapitza_at_volcanomail.com>
Date: 29 Jul 2003 03:43:47 -0700
Message-ID: <26703915.0307290243.2be541cf@posting.google.com>


probably you could do somthing like this :

 create or replace function fnc_eval_intervall (v2_intervall in varchar2 ) return date is

v_statement varchar2(1999);
v_cursorID integer;
v_date date;
v_rows integer;

begin
v_statement := 'select '||v2_intervall||' from dual'; v_cursorID := dbms_sql.open_cursor;
dbms_sql.parse(v_cursorID, v_statement,DBMS_SQL.V7); dbms_sql.define_column(v_cursorID, 1, v_date); v_rows := dbms_sql.execute_and_fetch(v_cursorID);
dbms_sql.column_value(v_cursorID, 1, v_date);
dbms_sql.close_cursor(v_cursorID);
dbms_output.put_line(v_date);

return v_date;
end;
/

ADMIN_at_DEV>select fnc_eval_intervall(interval) from dba_jobs;

FNC_EVAL_INTERVALL(INTERVAL)



DIENSTAG 29 JULI 2003 13:00:00 regards

s.kapitza
jerry_usenet_at_worldwideweave.com (Jerry Russell) wrote in message news:<a2cf3ef9.0307281632.67f97d76_at_posting.google.com>...
> If I wanted to parse a job interval string without actually submitting
> a job - is there any way to do this? I looked into the dbms_job
> interface in rdbms/admin, but didn't find anything useful there. I
> basically would like to have something I can pass the Oracle format
> interval string to and get back a date of the next actual run time the
> same way Oracle does to populate its dba_jobs tables.
>
> Thanks,
> Jerry
Received on Tue Jul 29 2003 - 05:43:47 CDT

Original text of this message

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