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;