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

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

RE: URGNET PL/SQL Help: PLS-00357

From: Daemen, Remco <R.Daemen_at_facent.nl>
Date: Tue, 17 Oct 2000 12:49:56 +0200
Message-Id: <10652.119434@fatcity.com>


Try=20

select SQ_EINSATZBERICHTE.NEXTVAL into .... from dual;

HTH, Remco

> ----------
> From: Schoen Volker[SMTP:v.schoen_at_inplan.de]
> Sent: dinsdag 17 oktober 2000 13:05
> To: Multiple recipients of list ORACLE-L
> Subject: URGNET PL/SQL Help: PLS-00357

>=20

> Hi list,

>=20
> 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?
>=20

> 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 /
>=20

> Warning: Trigger created with compilation errors.
>=20

> SQL> show errors;
> Errors for TRIGGER IEINSATZBERICHTE:
>=20

> 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
>=20

> 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
>=20

> TIA
>=20

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

> --=20
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --=20
> Author: Schoen Volker
> INET: v.schoen_at_inplan.de
>=20

> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing =
Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Tue Oct 17 2000 - 05:49:56 CDT

Original text of this message

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