Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Compilation Error on Trigger?
Type
show errors
or
select * from user_errors
to get the exact error message.
Out of your context nothing seems to be wrong, but it might be your context.
Personally I wouldn't use hardcoded schema owners in pl/sql, but it is
unlikely that is the problem.
Hth,
Sybrand Bakker, Oracle DBA
Jim Frohoff <jfro_at_nospam_jps.net> schreef in berichtnieuws
f1y%4.578$3p4.23012_at_news.uswest.net...
> 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
![]() |
![]() |