gpt4 book ai didi

database - 如何从oracle中的一个作业中调用两个程序?

转载 作者:搜寻专家 更新时间:2023-10-30 22:03:03 25 4
gpt4 key购买 nike

我想知道如何从 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:

最佳答案

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

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;

关于database - 如何从oracle中的一个作业中调用两个程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8159359/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com