【发布时间】:2011-11-25 08:23:47
【问题描述】:
我想使用触发器根据条件更新整行。我正在尝试这种情况,但它不起作用
create or replace trigger cust_person_merge_view_t
instead of update on CUST_MDM_PERSON_MERGE
referencing new as new
begin
update mdm_person_tt
set :old.row = :new.row;
where MDM_PARTY_ID =(select mdm_party_id from CUST_MDM_PERSON_MERGE where mdm_entity_id=:old.MDM_ENTITY_ID);
if ( sql%rowcount = 0 )
then
raise_application_error
( -20001, 'Error updating the CUST_MDM_PERSON_MERGE view !!!' );
end if;
end;
【问题讨论】:
-
您遇到了什么错误?你的数据库版本是多少? CUST_MDM_PERSON_MERGE 和 mdm_person_tt 是否相同?请在您的问题中提供更多相关信息。
标签: oracle plsql triggers plsqldeveloper