Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to start a trigger in a begin/end block ?

738778Dec 3 2009 — edited Dec 4 2009
Hi 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 1 2010
Added on Dec 3 2009
8 comments
1,032 views