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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Trigger not Compling

Re: Trigger not Compling

From: Derek <d.rogers_at_its.uq.edu.au>
Date: Tue, 6 Jan 2004 14:26:57 +1000
Message-ID: <btdd9v$f80$1@bunyip.cc.uq.edu.au>


Try this ... I think you just had a syntax error by not including the ":" before the new field names

CREATE OR REPLACE TRIGGER WR_COUNTRY_CODE_TR AFTER
INSERT ON WR_COUNTRY_CODE REFERENCING OLD AS O NEW AS N FOR EACH ROW Begin

  Insert INTO WR_Country_Code_A
  VALUES (SYSDATE,'ServerName','AppName','Insert',    :N.ID,:N.Country,:N.Description,:N.Active,'User_ID','E_sign');

END; Cheers,
Derek

"Jawahar Rajan" <jrajan_at_nc.rr.com> wrote in message news:OgqKb.210395$dl.10689824_at_twister.southeast.rr.com...
> All,
> I have a table created like so
>
> Create table WR_Country_code
> ( ID number not null,
> Country varchar2(50) not null,
> Description Varchar2(255) not null,
> Active number notnull));
>
> I have an Audit table like so
> Create table WR_Country_code_A
> ( Audit_Date date not null,
> Hostname varchar2(15) not null,
> App_name varchar2(15) not null,
> Action varchar2(10) not null
> ID number not null,
> Country varchar2(50) not null,
> Description Varchar2(255) not null,
> Active number not null,
> User_ID varchar2(50) not null,
> E_Sign varchar2(50) not null);
>
> I am trying to create a trigger like so
>
> CREATE OR REPLACE TRIGGER CTS_WEBRAND.WR_COUNTRY_CODE_TR
> AFTER
> INSERT ON "CTS_WEBRAND"."WR_COUNTRY_CODE" REFERENCING OLD AS O NEW AS N
FOR
> EACH ROW Begin
> Begin
>
> Insert INTO WR_Country_Code_A
> VALUES (SYSDATE,'ServerName','AppName','Insert',
> N.ID,N.Country,N.Description,N.Active,'User_ID','E_sign');
>
>
> End WR_Protocols_TR;
>
> I keeping getting this error:
> Line # = 5 Column # = 3 Error Text = PL/SQL: SQL Statement ignored
> Line # = 7 Column # = 35 Error Text = PL/SQL: ORA-00984: column not
allowed
> here
>
> I am puzzelled why this is happening?all the columns in both table are not
> null all I am trying to do is create a copy of the record with a few
> additional details
>
> Any ideas or help/suggetsions weelcome
>
> Thanks
> Jawahar
>
>
>
Received on Mon Jan 05 2004 - 22:26:57 CST

Original text of this message

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