Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.
ORA-04088: error during execution of trigger 04091. 00000 - "table %s.%s is mutating, trigger/function may not see it" *Cause: A trigger (or a user defined plsql function that is referenced in this statement) attempted to look at (or modify) a table that was in the middle of being modified by the statement which fired it. *Action: Rewrite the trigger (or function) so it does not read that table.
create or replace TRIGGER "update_date" BEFORE INSERT ON "scott"."data_list" REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW declare numbr number; begin begin select count(*) into numbr from t_values s where s.val = :new.val and s.Date_from = TO_DATE('31.12.2100','DD.MM.YYYY'); end; if numbr > 0 then begin update t_values s set Date_from = :new.date_to -1 where s.val = :new.val and s.Date_from = TO_DATE('31.12.2100','DD.MM.YYYY'); end; end if; end;
INSERT INTOdata_list ( val, date_from, date_to, mid_val, user, date ) ( SELECT a.VAL, A.date_from, A.date_to, A.mid_val, 'test_usr', a.date FROM temp_table A);