获取ORA-04079:此触发器的触发器规范错误无效,可以找出原因?表格 - TESTCOMM_FINDCOMM - 2个数字,价格和通讯
create or replace trigger TESTCOMM_FINDCOMM
AFTER
insert or update on "TESTCOMM"
for each row
referencing new as new and old as old
begin
:NEW.Commission:= :NEW.Price*get_Comm(:NEW.Price);
end;
功能get_Comm
create or replace function get_Comm
(i_price in NUMBER)
return NUMBER
as
o_COMMISSION_percent PRICECOMMISSION.COMMISSION%type;
begin
select COMMISSION
into o_COMMISSION_percent
from (
select COMMISSION,
rank () over (order by Price desc) rnk
from PRICECOMMISSION
where PRICE <= i_price
) where rnk = 1;
return o_COMMISSION_percent;
end;