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 -> Re: ORacle 8 or 9 Trigger Compile error help please

Re: ORacle 8 or 9 Trigger Compile error help please

From: gazzag <gareth_at_jamms.org>
Date: 13 Jul 2006 07:25:43 -0700
Message-ID: <1152800743.380465.240410@m79g2000cwm.googlegroups.com>


relipse_at_gmail.com wrote:
> Here is my trigger below!!! please help with those compile errors!!
>
> SQL> CREATE OR REPLACE TRIGGER trg_insertreg19toreg20
> 2 INSTEAD OF INSERT ON BD_REGISTRATIONS1_9_VIEW
> 3 FOR EACH ROW
> 4 BEGIN
> 5 INSERT INTO BD_REGISTRATIONS (REG_USER_ID, REG_BLDRV_ID,
> REG_DONATESCHTIME,
> 6 REG_DONORWALKIN, REG_DONATEACTTIME, REG_DONOREXCUSED,
> REG_REIMBURSED, REG_THANKYOUSENT)
> 7 VALUES (:NEW.REG_USER_ID,
> 8 :NEW.REG_BLDRV_ID,
> 9 :NEW.REG_DONATESCHTIME,
> 10 :NEW.REG_DONORWALKIN,
> 11 :NEW.REG_DONATEACTTIME,
> 12 :NEW.REG_DONOREXCUSED,
> 13 :NEW.REG_REIMBURSED,
> 14 :NEW.REG_THANKYOUSENT
> 15 );
> 16 IF (:NEW.REG_VOLSCHTIME IS NOT NULL) THEN
> 17 INSERT INTO BD_VOLUNTEERTIMES (VT_ID, VT_USER_ID,
> VT_BLDRV_ID, VT_SCHTIME, VT_ACTTIME,
> VT_EXCUSED)
> 18 VALUES( SEQ_VT_ID.NEXT,
> 19 :NEW.REG_USER_ID,
> 20 :NEW.REG_BLDRV_ID,
> 21 :NEW.REG_VOLSCHTIME,
> 22 :NEW.REG_VOLACTTIME,
> 23 :NEW.REG_VOLEXCUSED
> 24 );
> 25 END IF;
> 26 END;
> 27 /
>
> Warning: Trigger created with compilation errors.
>
> Errors for TRIGGER TRG_INSERTREG19TOREG20:
>
> LINE/COL ERROR
> --------
> -----------------------------------------------------------------
> 14/10 PL/SQL: SQL Statement ignored
> 15/31 PLS-00302: component 'NEXT' must be declared

Shouldn't line 18 be:

VALUES( SEQ_VT_ID.NEXTVAL, You appear to be using a sequence incorrectly.

HTH -g Received on Thu Jul 13 2006 - 09:25:43 CDT

Original text of this message

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