我创建了一个Package规范和正文,当我执行脚本时,我没有错误。但是我的包体仍处于无效状态。我不明白为什么,你能帮忙吗?
这是我的代码:
CREATE OR REPLACE PACKAGE BODY CONFIG_MODULE_API AS
FUNCTION APPLY_RULES(I_EVENT_ROWID IN VARCHAR2,
I_EVENT_TABLE_NAME IN VARCHAR2,
I_EVENT_OPERATION IN VARCHAR2,
O_EVENT_STAGE OUT CFG_EVENT_STAGE,
O_STATUS_CODE OUT VARCHAR,
O_ERROR_MSG OUT VARCHAR) RETURN BOOLEAN IS
BEGIN
--no code yet
RETURN NULL;
END APPLY_RULES;
PROCEDURE TEST_RULES(I_FILTER_ID NUMBER,
I_EVENT_TABLE_NAME VARCHAR2,
O_SQL_STMT OUT VARCHAR,
O_STATUS_CODE OUT VARCHAR,
O_ERROR_MSG OUT VARCHAR) IS
BEGIN
--no code yet
END TEST_RULES;
END CONFIG_MODULE_API;
这是我检查堆栈跟踪时得到的异常:
Compilation errors for PACKAGE BODY MYSHCEMA.CONFIG_MODULE_API
Error: PLS-00103: Encountered the symbol "END" when expecting one of the following:
( begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
continue close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe purge
Line: 20
Text: END TEST_RULES;
我错过了什么? (我的包规格,工作正常。)
答案 0 :(得分:3)
在BEGIN之后和END TEST_RULES之前需要一个空语句(它还没有代码。
BEGIN
NULL;
END TEST_RULES;