CREATE OR REPLACE TRIGGER x_BEFORE_INS_ROW
BEFORE INSERT OR UPDATE OF 007ON DS4.TC_MPSTX_FILE
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
begin
if INSERTING then
if :New.34is null then
:New.34 := :New.10;
end if;
:New.36:= :new.28;
end if;
if (:NEW.007 = 'W' AND
(:OLD.007 = 'N' OR :OLD.007= 'X')) then
:NEW.037:= 'Y';
end if;
exception
when others then
raise;
end x_before_ins_row;