Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Trigger created with compilation errors

Re: Trigger created with compilation errors

From: Stuart Cowen <stuco_at_cobaltspoon.com>
Date: 3 Oct 2002 12:29:59 -0700
Message-ID: <29563b71.0210031129.5d88d751@posting.google.com>


"iim" <lianghs_at_163.net> wrote in message news:<anhlrt$3fd$2_at_mail.cn99.com>...
> what is the problem ??
>
> Trigger created with compilation errors
>
>
> create trigger test
> after insert on test
> for each row
> begin
> end;
>
> why this can cause a warning error.

You actually have to do something between the 'BEGIN'ing and the 'END'. (Sort of philosophical, no?) I Tested this is SQL*Plus and issued a 'SHO ERRORS' command to give me more meaning behind the error. It basically said that you cannot directly follow 'BEGIN' with 'END'. Example:

SQL> create trigger test
  2 after insert on test
  3 for each row
  4 begin
  5 end;
  6 /

Warning: Trigger created with compilation errors.

SQL> sho errors
Errors for TRIGGER TEST:

LINE/COL ERROR

-------- -----------------------------------------------------------------
2/1      PLS-00103: Encountered the symbol "END" when expecting one of
the
         following:
         begin declare exit for goto if loop mod null pragma raise
         return select update while <an identifier>
         <a double-quoted delimited-identifier> <a bind variable> <<
         close current delete fetch lock insert open rollback
         savepoint set sql execute commit forall
         <a single-quoted SQL string>

HTH Stuart Cowen Received on Thu Oct 03 2002 - 14:29:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US