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

Home -> Community -> Mailing Lists -> Oracle-L -> URGNET PL/SQL Help: PLS-00357

URGNET PL/SQL Help: PLS-00357

From: Schoen Volker <v.schoen_at_inplan.de>
Date: Tue, 17 Oct 2000 12:00:36 +0200
Message-Id: <10652.119427@fatcity.com>


Hi list,

I want to get a value from a sequence in a trigger. If I try the = following
trigger, I get PLS-00357 error. Any suggestions?

SQL> CREATE OR REPLACE TRIGGER IEINSATZBERICHTE BEFORE INSERT ON EINSATZBERICHTE REFERENCING NEW AS=20
NEW FOR EACH ROW
  2 BEGIN
  3 :NEW.LFDNR :=3D SQ_EINSATZBERICHTE.NEXTVAL;   4 END;
  5 /

Warning: Trigger created with compilation errors.

SQL> show errors;
Errors for TRIGGER IEINSATZBERICHTE:

LINE/COL ERROR
-------- =


2/1      PL/SQL: Statement ignored
2/34     PLS-00357: Table,View Or Sequence reference
         'SQ_EINSATZBERICHTE.NEXTVAL' not allowed in this context

SQL> select SQ_EINSATZBERICHTE.NEXTVAL from SQ_EINSATZBERICHTE; select SQ_EINSATZBERICHTE.NEXTVAL from SQ_EINSATZBERICHTE

                                       *
ERROR at line 1:
ORA-02201: sequence not allowed here

TIA Volker Sch=F6n
E-Mail: mailto:v.schoen_at_inplan.de Received on Tue Oct 17 2000 - 05:00:36 CDT

Original text of this message

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