触发器获取修改涉及的行的问题
触发器内容
create or replace trigger TRIGGER_B_CBCPXXB
before insert or update or delete on B_CBCPXXB
referencing old as old_value
new as new_value
for each row
begin
UPDATE B_QYJBXXB A
SET A.FBZT = 0
WHERE A.QYID =
(SELECT B.QYID FROM B_QYCPLBB B WHERE
B.QYCPLBID =
(SELECT C.QYCPLBID FROM B_CPJBXXB C WHERE C.CPID = new_value.CPID));
end;
编译提示是:new_value.CPID是无效的标识符.
我这里的目的似乎获取新插入或修改的行的CPID列的值,应该怎么获取呢?
------解决方案--------------------new_value.CPID
改为
:new.CPID