预言机触发器出错



我是编程新手,我不擅长编程,所以请帮助我解决下一个问题:

我有这个触发器:

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.

尝试使用以下代码:

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')
then :new.INCERCARE := 'NEDC';
end if;  
end;

我认为您在封装OR的括号方面遇到了问题。

最新更新