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

Home -> Community -> Usenet -> c.d.o.tools -> Compilation Error on Trigger?

Compilation Error on Trigger?

From: Jim Frohoff <jfro_at_nospam_jps.net>
Date: 2000/06/07
Message-ID: <f1y%4.578$3p4.23012@news.uswest.net>#1/1

I am trying to learn Oracle 8i, installed on an NT box. I created this trigger to automatically insert a sequential value into the [newid] field in my test table "jfrotest". I first created a sequence with index of 1 named as "jfrotest_seq" and then wrote the following trigger:

create or replace trigger jfro.jfrotest_BI  before insert on jfro.jfrotest
 for each row
 declare next_num NUMBER;
 begin
  select jfro.jfrotest_seq.next_val
  into next_num from dual;
 :new.newid := next_num;
end;

From SQL *Plus, I type this in then hit "/" to compile and run it. All I get is :
"Warning : Trigger created with compilation errors"

The trigger won't work as it causes an error when I now try to insert. How can I tell what exactly is wrong with this trigger code? What is it trying to tell me is the "compilation error"?

Thanks in advance for any help/ideas! jf



Jim Frohoff
jfro_at_NOSPAM_jps.net
Remove "NOSPAM_" to send directly to me Received on Wed Jun 07 2000 - 00:00:00 CDT

Original text of this message

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