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

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

SOLVED: URGNET PL/SQL Help: PLS-00357

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


Thanks for the quick help

select SQ_EINSATZBERICHTE.NEXTVAL

	into :NEW.LFDNR
	from dual

works fine

Regards
Volker Sch=F6n
E-Mail: mailto:v.schoen_at_inplan.de
http://www.inplan.de

-----Urspr=FCngliche Nachricht-----

Von: Schoen Volker [mailto:v.schoen_at_inplan.de] Gesendet: 17. October 2000 12:01
An: 'Oracle Lazy DBA list'; 'Oracle List' Betreff: URGNET PL/SQL Help: PLS-00357
Wichtigkeit: Hoch

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
http://www.inplan.de



Think you know someone who can answer the above question? Forward it to them!
to unsubscribe, send a blank email to oracledba-unsubscribe_at_LAZYDBA.com to subscribe send a blank email to oracledba-subscribe_at_LAZYDBA.com=20 Received on Tue Oct 17 2000 - 05:19:00 CDT

Original text of this message

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