0
Good afternoon, guys. How are you? I’m trying to create a Rigger that when performing a partner registration it automatically marks that the partner is a client. In the database, this field is called CLIENT and receives the value’S', however, I am facing the following error when trying to register a partner :ORA-04098: 'TEST.AD_TRG_INC_UPD_TGFPAR' trigger is invalid and the revalidation failed. Could you help me?
CREATE OR REPLACE TRIGGER AD_TRG_INC_UPD_TGFPAR
BEFORE INSERT OR UPDATE OF CLIENTE ON TGFPAR
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
BEGIN
IF :NEW.CLIENTE ='N' OR :NEW.CLIENTE IS NULL THEN
:NEW.CLIENTE := 'S';
END´´´
In this case the DEFAULT clause is not enough?
– anonimo
As well as DEFAULT clause?
– Pablo Dos Santos Neves
https://oracle-base.com/articles/12c/default-values-for-table-columns-enhancements-12cr1#nulls alter table TGFPAR Modify default client’S';
– Motta