Re: Trigger Help for Oracle newbie...
Date: Thu, 03 Jun 1999 16:26:05 GMT
Message-ID: <7j6aah$jdg$1_at_nnrp1.deja.com>
Wayne,
Try downloading a 15 day trial version of the "PL/SQL Knowledge Base" from RevealNet. It has an extensive section on triggers - with design guidelines, firing sequences, diagrams, tutorials, and numerous examples. http://www.revealnet.com
Best wishes,
Cam White
RevealNet, Inc.
In article <7j3ms3$gnj_at_journal.concentric.net>,
"Wayne C. Wilson" <wayne_at_isales.com> wrote:
> Hi,
>
> 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
> all, after I compile it in SQL*PLUS and it tell me I have errors, how
can I
> 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;
>
> TEAMS_SEQ.NEXTVAL should be valid, but just to be sure I also tried
setting
> ID to 10000.
>
> Any help would be appreciated.
>
> --Wayne
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Thu Jun 03 1999 - 18:26:05 CEST