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 compiler error (Ora9i)

Re: Trigger created with compiler error (Ora9i)

From: damorgan <dan.morgan_at_ci.seattle.wa.us>
Date: Mon, 11 Feb 2002 18:48:00 GMT
Message-ID: <3C6811DF.11D0DF4D@ci.seattle.wa.us>


What error? Do they charge you more money to post error messages so someone can help you?

But from where I sit I see a number of possibilities. Here they are in no particular order.

  1. You are trying to insert into the table the trigger is on. Can't be done.
  2. You have used a number of Oracle reserved word 'user' for a column names ... a really bad idea.
  3. Use NULL not '' if you aren't going to insert anything. Though better yet just leave the column out entirely.
  4. After a trigger doesn't compile type SQL> SHO ERR and write down the error. You can then go to your documentation, technet, metalink, or these usenet groups and get advice that actually relates to the problem you are having.

Daniel Morgan

odette wrote:

> If I try to execute a local script on the SQL *Plus Worksheet to
> create a trigger, I alway get the warning: Trigger created with
> compiler error.
> Is this an Oracle problem or is it that my sql source code is wrong?
> Here is my source code, please help!
>
> CREATE or replace TRIGGER "xxx"."name" AFTER
> INSERT ON "xxx"."tablename"
> FOR EACH ROW begin
> insert into table
> ( user,
> action,
> table,
> old,
> new,
> time)
>
> values
> ( principal_name,
> 'insert',
> 'table',
> '',
> :new.id,
> '02.02.02');
> end;
Received on Mon Feb 11 2002 - 12:48:00 CST

Original text of this message

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