CREATE OR REPLACE TRIGGER venderAutoInsert
                     after INSERT
                     ON ar.hz_parties
                     REFERENCING NEW AS NEW OLD AS OLD
                     FOR EACH ROW
declare
 org_type varchar2;                     
BEGIN
select party_type into org_type from hz_parties hz,pom_party_preferences p where hz.party_id=:new.party_id and party_type='ORGANIZATION' and preference_name='TRADING_PARTNER_TYPE' 
and hz.party_id = p.party_id and preference_value in ('SELLER','BUYER&SELLER') ;
if (org_type is not null)
{
            insert into venderinfor 
(vi_excid,vi_excname,vi_sort,vi_usname,vi_date,vi_lastupdate_ususername,vi_lastupdate_usname,vi_lastupdatedate) 
VALUES(:NEW.party_id,:NEW.party_name,'','APPS',sysdate-365*30,'APPS','APPS',sysdate-365*30)
};
END;
我简要说明下需求和逻辑:涉及到3个表:新注册信息表venderinfor,老注册信息表hz_parties,注册信息分类表pom_party_preferences。要求每次向hz_parties insert数据的时候,对数据进行检查,如果数据的party_type是'ORGANIZATION' 且preference_value in ('SELLER','BUYER&SELLER'),则向venderinfor表里也插入相应的一些数据。
party_type 和preference_value 这两个字段都在pom_party_preferences表里面。
Oracle 逐行触发器, 不能检索 被触发的表 刚才有个人胸告诉我的。那我该怎么办呢?