Use keyword elsif
instead of elseif
Trigger Error(14,1): PLS-00103: Encountered the symbol "THEN" when expecting one of the following: := . ( % ;
-
12-07-2023 - |
题
I have this trigger
create or replace
trigger trg_cust
after insert or update on nbty_customer
referencing old as old new as new
for each row
declare
sal_diff number;
begin
if(:new.cust_sal>:old.cust_sal)
then
update nbty_cache_cust set cust_nbty_sal=:new.cust_sal where cust_nbty_id=:old.cust_id;
elseif(:new.cust_sal<:old.cust_sal)
then
update nbty_cache_cust set cust_nbty_sal=:old.cust_sal+:new.cust_sal where cust_nbty_id=:old.cust_id;
end if;
end;
But this is throwing
Error(14,1): PLS-00103: Encountered the symbol "THEN" when expecting one of the following: := . ( % ;
I am not getting what is wrong in this kindly help
解决方案
不隶属于 StackOverflow