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: Jim Kennedy <kennedy-downwithspammersfamily_at_attbi.net>
Date: Tue, 06 Jan 2004 03:57:15 GMT
Message-ID: <vmqKb.761556$Fm2.722478@attbi_s04>

"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
>
>
>

You should have the columns named and NOT rely on the order they were created.
eg insert into mytable (a,b,c) values(123) Also to reference the new items do :N.ID Jim Received on Mon Jan 05 2004 - 21:57:15 CST

Original text of this message

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