¿Hay alguna forma de crear múltiples desencadenantes en una secuencia de comandos?
stoy tratando de crear múltiples desencadenantes con solo cargar un script en un espacio de trabajo de Oracle DB / APEX y ejecutarlo una vez.
Aquí hay un breve script comparado con el que estoy tratando de usar:
create or replace trigger "BI_TEC_ROLES"
before insert on "TEC_ROLES"
for each row
begin
if :NEW."ROLE_ID" is null then
select "TEC_ROLES_SEQ".nextval into :NEW."ROLE_ID" from dual;
end if;
end;
create or replace trigger "BI_TEC_STATUSES"
before insert on "TEC_STATUSES"
for each row
begin
if :NEW."STATUS_ID" is null then
select "TEC_STATUSES_SEQ".nextval into :NEW."STATUS_ID" from dual;
end if;
end;
create or replace trigger "BI_TEC_SUBS"
before insert on "TEC_SUBS"
for each row
begin
if :NEW."SUB_ID" is null then
select "TEC_SUBS_SEQ".nextval into :NEW."SUB_ID" from dual;
end if;
end;
He intentado poner GO entre cada bloque individual, pero todavía solo crea el primer disparador y luego me da un error para el segundo diciendo:
Error(7,1): PLS-00103: Encountered the symbol "CREATE"
Espero que sea posible hacer esto. Muchas gracias por su tiempo e interés =)