Results 1 to 2 of 2

Thread: DBMS_JOB Issue

  1. #1
    Join Date
    Apr 2012
    Posts
    4

    Unhappy Unanswered: DBMS_JOB Issue

    Hello Team,

    Can you help me to resolve the below error.

    I was trying to create a job with below script and ended up the an error.

    DECLARE
    X NUMBER;
    BEGIN
    SYS.DBMS_JOB.SUBMIT
    (
    job => X
    ,what => 'truncate table daily_snapshot_tmp;

    begin
    insert into daily_snapshot_tmp

    SELECT DISTINCT TRUNC(SYSDATE - 1) AS snapshot_date,
    nvl(max(******) as ABC
    nvl(max(******) as XYZ
    cast(null as number(10,2)) as ASDF
    cast(null as number(10,2)) as ZXCV
    .....
    ....
    ...
    commit;
    end;

    begin
    update daily_snapshot_tmp arm set
    ASDF= <condition>
    ZXV = <condition>
    commit;
    end;
    next_date => to_date('18/06/2012 13:00:05','dd/mm/yyyy hh24:mi:ss')
    ,no_parse => FALSE
    );
    :JobNumber := to_char(X);
    END;
    Error-

    ORA-06550: line 1, column 102:
    PLS-00103: Encountered the symbol "TABLE" when expecting one of the following:

    := . ( @ % ;
    The symbol ":= was inserted before "TABLE" to continue.
    ORA-06550: line 10, column 26:
    PLS-00103: Encountered the symbol "(" when expecting one of the following:

    . ) @ %
    The symbol ")" was substituted for "(" to continue.
    ORA-06550: line 10, column 32:
    PLS-00103: Encountered the symbol ")" when expecting one of the following:

    . ( , * % & - + / at mod rem <an identifier>

    Thanks,
    Nissam

  2. #2
    Join Date
    Jun 2004
    Posts
    796
    Provided Answers: 1
    what => 'truncate table daily_snapshot_tmp
    You're missing a single quote at the end
    90% of users' problems can be resolved by punching them - the other 10% by switching off their PCs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •