OraQA

Oracle Question and Answer

  • Do you have a solution to a problem? Do you have an unanswered question? Login and share it with the Oracle community. More...

Oracle News


Entries RSS feed

Comments RSS feed

How to add comment inside DBMS_JOB “Interval” field?

January 24th, 2006 By koreskok

Using DBMS_JOB.INTERVAL, I would like to submit the entire following line including the comment at the end: (TRUNC(SYSDATE) + 1) + 345/1440 /* 5:45 a.m. daily */

I cannot remember how to format the SQL so that the comment is accepted. Any insight would be appreciated!

One Response to “How to add comment inside DBMS_JOB “Interval” field?”

  1. Claudiu Ariton Says:

    Hello

    Use the natural way:

    set serveroutput on

    declare
    job_num integer;
    begin
    dbms_job.submit (job_num,’t;’,trunc(sysdate)+1+7/24,’trunc(sysdate)+1+7/24 /*7:00 a.m. daily */’,FALSE);
    dbms_output.put_line(’Job number=’||to_char(job_num));
    end;
    /

    Job number=62

    execute dbms_job.run(62);

    select to_Char(next_date,’DD-MM-YYYY HH24:MI:SS’) next_date,interval from user_jobs where job=62
    /

    NEXT_DATE
    ——————-
    INTERVAL
    ————————————————————————

    26-01-2006 07:00:00
    trunc(sysdate)+1+7/24 /*7:00 a.m. daily */

    Best regards,
    Claudiu Ariton

Leave a Reply

You must be logged in to post a comment.

RSS feed for comments on this question