prompt ------------------------------------------------
prompt Executing...DDL/SCRIPT NAME.sql
prompt ------------------------------------------------
SET SERVEROUTPUT ON;
SET VERIFY OFF;
WHENEVER SQLERROR EXIT ;
WHENEVER OSERROR EXIT ;
prompt DDL/JIRA-ID Checking columns UPDT_USERID, TIME_STAMP, LAST_ACTION for NULL values.
DECLARE
v_error boolean := FALSE;
v_exit EXCEPTION;
Begin
--- Some Code
END;
运行此代码时,我遇到错误
prompt DDL/JIRA-ID Checking columns UPDT_USERID, TIME_STAMP, LAST_ACTION for NULL values.
错误如下。
DDL/FND-18918 Checking columns UPDT_USERID, TIME_STAMP, LAST_ACTION for NULL values.
prompt DDL/FND-18918 Checking columns HIST_USERID, HIST_TIME_STAMP, HIST_ACTION for NULL values.
*
ORA-06550:
PLS-00103: Encountered the symbol "DDL" when expecting one of the following:
:= . ( @ % ;
The symbol ":=" was substituted for "DDL" to continue.
ORA-06550:
PLS-00103: Encountered the symbol "CHECKING" when expecting one of the
following:
* & = - + ; < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like like2
like4 likec between || member submultiset
我能否确切知道这一点的根本原因。因为我有很长的DDL脚本,我在每个DECLARE块之前都放了一个提示语句。
答案 0 :(得分:0)
I have tried your code only. Just modified a bit and its working fine.
prompt ------------------------------------------------
prompt Executing...DDL/SCRIPT NAME.sql
prompt ------------------------------------------------
SET SERVEROUTPUT ON;
SET VERIFY OFF;
WHENEVER SQLERROR EXIT ;
WHENEVER OSERROR EXIT ;
prompt DDL/JIRA-ID Checking columns UPDT_USERID, TIME_STAMP, LAST_ACTION for NULL values.
DECLARE
v_error BOOLEAN := FALSE;
v_exit EXCEPTION;
BEGIN
--- Some Code
NULL;
END;
------------------------------------------------
prompt Executing...DDL/SCRIPT NAME.sql
------------------------------------------------
DDL/JIRA-ID Checking columns UPDT_USERID, TIME_STAMP, LAST_ACTION for NULL values.
anonymous block completed
答案 1 :(得分:0)
另请注意sqlplus命令以 - 结尾 - 继续到下一行..
成功/不成功还取决于您的客户。