Message-Id: <10652.119436@fatcity.com> From: Amar Kumar Padhi Date: Tue, 17 Oct 2000 15:02:43 +0400 Subject: RE: URGNET PL/SQL Help: PLS-00357 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C03829.C5E556D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable use=20 select SQ_EINSATZBERICHTE.NEXTVAL=20 into :NEW.LFDNR from dual; in the trigger. Thanks, Amar 00-971-50-7883254 ts2017@emirates.com amar_padhi@hotmail.com amar_padhi@musclemail.com -----Original Message----- From: Schoen Volker [mailto:v.schoen@inplan.de] Sent: Tuesday, October 17, 2000 3:05 PM To: Multiple recipients of list ORACLE-L Subject: URGNET PL/SQL Help: PLS-00357 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@inplan.de http://www.inplan.de --=20 Please see the official ORACLE-L FAQ: http://www.orafaq.com --=20 Author: Schoen Volker INET: v.schoen@inplan.de 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@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). ------_=_NextPart_001_01C03829.C5E556D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: URGNET PL/SQL Help: PLS-00357

use
   select SQ_EINSATZBERICHTE.NEXTVAL =
   into  :NEW.LFDNR
   from dual;

in the trigger.

Thanks,
Amar
00-971-50-7883254
ts2017@emirates.com
amar_padhi@hotmail.com
amar_padhi@musclemail.com



-----Original Message-----
From: Schoen Volker [mailto:v.schoen@inplan.de]=
Sent: Tuesday, October 17, 2000 3:05 PM
To: Multiple recipients of list ORACLE-L
Subject: URGNET PL/SQL Help: PLS-00357


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
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
          &nb= sp;           &nb= sp;           &nb= sp;    *
ERROR at line 1:
ORA-02201: sequence not allowed here

TIA

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


--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Schoen Volker
  INET: v.schoen@inplan.de

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