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: Amar Kumar Padhi <TS2017_at_emirates.com>
Date: Tue, 17 Oct 2000 15:02:43 +0400
Message-Id: <10652.119436@fatcity.com>


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_at_emirates.com
amar_padhi_at_hotmail.com
amar_padhi_at_musclemail.com

-----Original Message-----
From: Schoen Volker [mailto:v.schoen_at_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_at_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_at_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_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).

------_=_NextPart_001_01C03829.C5E556D0
Content-Type: text/html;

        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2652.35">
<TITLE>RE: URGNET PL/SQL Help: PLS-00357</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>use </FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp; select SQ_EINSATZBERICHTE.NEXTVAL =
</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp; into&nbsp; :NEW.LFDNR</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp; from dual;</FONT> </P>

<P><FONT SIZE=3D2>in the trigger.</FONT> </P>

<P><FONT SIZE=3D2>Thanks,</FONT>
<BR><FONT SIZE=3D2>Amar</FONT>
<BR><FONT SIZE=3D2>00-971-50-7883254</FONT>
<BR><FONT SIZE=3D2>ts2017_at_emirates.com</FONT>
<BR><FONT SIZE=3D2>amar_padhi_at_hotmail.com</FONT>
<BR><FONT SIZE=3D2>amar_padhi_at_musclemail.com</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>-----Original Message-----</FONT> <BR><FONT SIZE=3D2>From: Schoen Volker [<A = HREF=3D"mailto:v.schoen_at_inplan.de">mailto:v.schoen_at_inplan.de</A>]</FONT>=

<BR><FONT SIZE=3D2>Sent: Tuesday, October 17, 2000 3:05 PM</FONT>
<BR><FONT SIZE=3D2>To: Multiple recipients of list ORACLE-L</FONT>
<BR><FONT SIZE=3D2>Subject: URGNET PL/SQL Help: PLS-00357</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Hi list,</FONT>
</P>

<P><FONT SIZE=3D2>I want to get a value from a sequence in a trigger. = If I try the following</FONT>
<BR><FONT SIZE=3D2>trigger, I get PLS-00357 error. Any = suggestions?</FONT>
</P>

<P><FONT SIZE=3D2>SQL&gt; CREATE OR REPLACE TRIGGER IEINSATZBERICHTE = BEFORE INSERT ON</FONT>

<BR><FONT SIZE=3D2>EINSATZBERICHTE REFERENCING NEW AS </FONT>
<BR><FONT SIZE=3D2>NEW FOR EACH ROW</FONT>
<BR><FONT SIZE=3D2>&nbsp; 2&nbsp; BEGIN</FONT>
<BR><FONT SIZE=3D2>&nbsp; 3&nbsp; :NEW.LFDNR :=3D =
SQ_EINSATZBERICHTE.NEXTVAL;</FONT>
<BR><FONT SIZE=3D2>&nbsp; 4&nbsp; END;</FONT>
<BR><FONT SIZE=3D2>&nbsp; 5&nbsp; /</FONT>
</P>

<P><FONT SIZE=3D2>Warning: Trigger created with compilation = errors.</FONT>
</P>

<P><FONT SIZE=3D2>SQL&gt; show errors;</FONT>
<BR><FONT SIZE=3D2>Errors for TRIGGER IEINSATZBERICHTE:</FONT>
</P>

<P><FONT SIZE=3D2>LINE/COL ERROR</FONT>
<BR><FONT SIZE=3D2>-------- =

-----------------------------------------------------------------</FONT>=

<BR><FONT SIZE=3D2>2/1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PL/SQL: Statement = ignored</FONT>
<BR><FONT SIZE=3D2>2/34&nbsp;&nbsp;&nbsp;&nbsp; PLS-00357: Table,View = Or Sequence reference</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 'SQ_EINSATZBERICHTE.NEXTVAL' not allowed in this context</FONT> </P>

<P><FONT SIZE=3D2>SQL&gt; select SQ_EINSATZBERICHTE.NEXTVAL from = SQ_EINSATZBERICHTE;</FONT>
<BR><FONT SIZE=3D2>select SQ_EINSATZBERICHTE.NEXTVAL from = SQ_EINSATZBERICHTE</FONT>
<BR><FONT =

SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; *</FONT>
<BR><FONT SIZE=3D2>ERROR at line 1:</FONT>
<BR><FONT SIZE=3D2>ORA-02201: sequence not allowed here</FONT> </P>

<P><FONT SIZE=3D2>TIA</FONT>
</P>

<P><FONT SIZE=3D2>Volker Sch=F6n</FONT>
<BR><FONT SIZE=3D2>E-Mail: <A =
HREF=3D"mailto:v.schoen_at_inplan.de">mailto:v.schoen_at_inplan.de</A></FONT> <BR><FONT SIZE=3D2><A HREF=3D"http://www.inplan.de" = TARGET=3D"_blank">http://www.inplan.de</A></FONT> </P>
<BR>

<P><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Please see the official ORACLE-L FAQ: <A = HREF=3D"http://www.orafaq.com" =
TARGET=3D"_blank">http://www.orafaq.com</A></FONT>

<BR><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Author: Schoen Volker</FONT>
<BR><FONT SIZE=3D2>&nbsp; INET: v.schoen_at_inplan.de</FONT>
</P>

<P><FONT SIZE=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) = 538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT SIZE=3D2>San Diego, =
California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet = access / Mailing Lists</FONT>
<BR><FONT =

SIZE=3D2>---------------------------------------------------------------=
-----</FONT>
<BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an = E-Mail message</FONT>
<BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of = 'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB = ORACLE-L</FONT>
<BR><FONT SIZE=3D2>(or the name of mailing list you want to be removed = Received on Tue Oct 17 2000 - 06:02:43 CDT

Original text of this message

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