1

我想知道如何从 Oracle 的工作中调用两个过程。我已经像下面提到的那样提到了它,但是我收到了一个错误,例如...

Error starting at line 1 in command:
    DECLARE
    JOBID NUMBER;
    BEGIN
    DBMS_JOB.SUBMIT ( 
    job => JOBID,
    what => 'BOS_CMSFUNCTIONS.INSERTISAC_EXTRACT@CMSQ7_EXT.WORLD;isacfunctions.getisac_extract',
    next_date=> TRUNC(SYSDATE+1) + 21/24,
    interval=> 'TRUNC(SYSDATE+1) + 21/24');
    COMMIT;
    END;
Error report:
ORA-06550: line 1, column 175:
PLS-00103: Encountered the symbol "END" when expecting one of the following:
   := . ( @ % ;
The symbol ";" was substituted for "END" to continue.
ORA-06512: at "SYS.DBMS_JOB", line 82
ORA-06512: at "SYS.DBMS_JOB", line 139
ORA-06512: at line 4
06550. 00000 -  "line %s, column %s:\n%s"
*Cause:    Usually a PL/SQL compilation error.
*Action:
4

1 回答 1

4

您需要构造一个有效的 PL/SQL 块。假设两个过程名称都是有效的,并且两个过程调用都没有参数

DECLARE
  JOBID NUMBER;
BEGIN
  DBMS_JOB.SUBMIT ( 
    job => JOBID,
    what => 'BEGIN ' ||
            '  BOS_CMSFUNCTIONS.INSERTISAC_EXTRACT@CMSQ7_EXT.WORLD; ' ||
            '  isacfunctions.getisac_extract; ' ||
            'END;',
    next_date=> TRUNC(SYSDATE+1) + 21/24,
    interval=> 'TRUNC(SYSDATE+1) + 21/24');
  COMMIT;
END;
于 2011-11-16T22:09:32.870 回答