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 -> Basic Trigger Question

Basic Trigger Question

From: Buck Turgidson <jc_va_at_hotmail.com>
Date: 31 Aug 2001 10:39:34 -0700
Message-ID: <f98999c8.0108310939.2a6b416a@posting.google.com>


This is probably a piece of cake for most people, but I am having trouble getting a simple trigger to work. I want to analyze a table that is populated and then subsequently used in the same batch process.

I want to analyze it after an insert or delete, but am getting the following error. I would appreciate someone showing me the errors of my ways.

SQL> CREATE OR REPLACE TRIGGER TR_MYTABLE   2 AFTER INSERT OR DELETE ON MYTABLE   3 BEGIN
  4 ANALYZE TABLE MYTABLE ESTIMATE STATISTICS SAMPLE 30 PERCENT;   5 END;
  6 /

Warning: Trigger created with compilation errors.

SQL> SHOW ERRORS
Errors for TRIGGER TR_MYTABLE:

LINE/COL ERROR

-------- -----------------------------------------------------------------
2/11     PLS-00103: Encountered the symbol "TABLE" when expecting one
of
         the following:
         := . ( @ % ;
Received on Fri Aug 31 2001 - 12:39:34 CDT

Original text of this message

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