Trigger Help for Oracle newbie...

From: Wayne C. Wilson <wayne_at_isales.com>
Date: 02 Jun 1999 09:41:39 PDT
Message-ID: <7j3ms3$gnj_at_journal.concentric.net>



Hi,

[Quoted] [Quoted] I am pretty new to Oracle (we have 8i) and am trying to write my first trigger; it compliles with error and then fails when it executes. First of [Quoted] all, after I compile it in SQL*PLUS and it tell me I have errors, how can I [Quoted] [Quoted] see the errors? Secondly, here is my trigger, can you see any obvious errors? (the MTDB schema is valid, as is the column ID and table name TEAMS). CREATE OR REPLACE TRIGGER MTDB.TEAMS_INSERT BEFORE INSERT ON MTDB.TEAMS
FOR EACH ROW WHEN (new.ID = 0)
BEGIN
   ID := TEAMS_SEQ.NEXTVAL;
END; [Quoted] TEAMS_SEQ.NEXTVAL should be valid, but just to be sure I also tried setting [Quoted] ID to 10000.

Any help would be appreciated.

--Wayne Received on Wed Jun 02 1999 - 18:41:39 CEST

Original text of this message