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

Home -> Community -> Usenet -> c.d.o.server -> Creating Triggers in Oracle 8i Lite 4.0

Creating Triggers in Oracle 8i Lite 4.0

From: Richard Speiss <richard_at_mail.infocorp.mb.ca>
Date: Tue, 7 Sep 1999 16:39:06 -0500
Message-ID: <rtb1f4iu8os44@corp.supernews.com>


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

Original text of this message

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