Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Creating Triggers in Oracle 8i Lite 4.0
I am trying to convert a SQL Anywhere database to Oracle 8I Lite 4.0 and am
very new to the Oracle environment. So far I have been able to create the
users, tables, indexes, and sequences. So far so good.
Now I am trying to create a trigger using a sequence. I am logged into SQLPlus under SYSTEM and I just keep getting syntax errors. This is my script:
create or replace trigger MaintenanceLog_BI
before insert on "DBA"."MaintenanceLog"
for each row
when (new.Counter is null)
begin
select trunc(seqMaintenanceLogAuto.NextVal)
into :new.Counter from Dual;
end;
/
When I execute the START TRIG.SQL line I get:
*
Error at line 1:
OCA-30021: error preparing/executing SQL statement
[POL-5228] syntax error
From all of the samples that I have found I'm pretty sure the command is correct. The table and column do exist.
What am I doing wrong?
Thanks
Richard Speiss
Received on Tue Sep 07 1999 - 16:39:06 CDT
![]() |
![]() |