S
success_mtc
Unregistered / Unconfirmed
GUEST, unregistred user!
一个视图创建触发器,但是没执行!
请各大侠指点:
CREATE OR REPLACE TRIGGER WZADMIN.V_CM_SNAPZDYBM_INSERT
INSTEAD OF INSERT OR UPDATE
ON WZADMIN.V_CM_SNAPZDYBM
REFERENCING OLD AS OLD NEW AS NEW
declare
num number;
begin
select count(*) into num from T_S_CODECOMP where ZDYWZBM=:NEW.ZDYWZBM;
if num=0 then
insert into T_S_CODECOMP (ZDYWZBM,QDBM,DW,BMCSBZ)
valuesNEW.ZDYWZBM,'',:NEW.DW,'');
end if;
commit;
end;
/
请各大侠指点:
CREATE OR REPLACE TRIGGER WZADMIN.V_CM_SNAPZDYBM_INSERT
INSTEAD OF INSERT OR UPDATE
ON WZADMIN.V_CM_SNAPZDYBM
REFERENCING OLD AS OLD NEW AS NEW
declare
num number;
begin
select count(*) into num from T_S_CODECOMP where ZDYWZBM=:NEW.ZDYWZBM;
if num=0 then
insert into T_S_CODECOMP (ZDYWZBM,QDBM,DW,BMCSBZ)
valuesNEW.ZDYWZBM,'',:NEW.DW,'');
end if;
commit;
end;
/