How to start a trigger in a begin/end block ?
738778Dec 3 2009 — edited Dec 4 2009Hi all, I need to start a trigger inside a block begin end in order to manage errors.
The trigger is created inside trigger_faef_c.sql as
CREATE OR REPLACE TRIGGER TRIGGER_FAEF
and I would like to start the trigger in another file "create_trigger.sql" with this format:
BEGIN
@trigger_faef_c;
EXCEPTION WHEN OTHERS THEN
dbms_output.Put_Line('#255#> Error in trigger_faef_c ' || Sqlerrm );
END;
I have this error executing the script:
PLS-00103: Encountered the symbol "@" when expecting one of the following:
begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe
The symbol "<an identifier>" was substituted for "@" to continue
Can anyone help me please ?
I have to use EXCEPTION WHEN OTHERS THEN.
Thansk
Erik