【发布时间】:2018-08-21 09:37:22
【问题描述】:
我是编程新手,不擅长,所以请帮我解决下一个问题:
我有这个触发器:
begin
if (:new.POLUARE LIKE '%W%'
OR :new.POLUARE LIKE '%ZA%'
OR :new.POLUARE LIKE '%ZD%'
OR :new.POLUARE LIKE '%ZG%'
OR :new.POLUARE LIKE '%ZJ%') AND SUBSTR(NR_REGISTR,1,1)='A'
` `:new.INCERCARE:='NEDC';
end if;
end;
我收到以下错误:
PLS-00103: Encountered the symbol "" when expecting one of the following:
* & - + / at mod remainder rem then <an exponent (**)> and or || multiset
The symbol "then" was substituted for "" to continue.
【问题讨论】:
-
这些反引号是您原始代码的一部分,还是在您尝试格式化时出现在问题中?
-
IF需要THEN。详见手册:docs.oracle.com/database/121/LNPLS/… -
PL/SQL 使用
then关键字来终止if条件(if x then y; end if;),而其他一些语言使用括号(if (x) y;)你不需要两者。
标签: oracle plsql database-trigger