Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> 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_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:
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">
<TITLE>RE: URGNET PL/SQL Help: PLS-00357</TITLE> </HEAD> <BODY> <P><FONT SIZE=3D2>use </FONT> <BR><FONT SIZE=3D2> select SQ_EINSATZBERICHTE.NEXTVAL = </FONT> <BR><FONT SIZE=3D2> into :NEW.LFDNR</FONT><BR><FONT SIZE=3D2> 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> 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> 2 BEGIN</FONT> <BR><FONT SIZE=3D2> 3 :NEW.LFDNR :=3D =SQ_EINSATZBERICHTE.NEXTVAL;</FONT>
<BR><FONT SIZE=3D2> 4 END;</FONT> <BR><FONT SIZE=3D2> 5 /</FONT> </P>
<P><FONT SIZE=3D2>Warning: Trigger created with compilation =
errors.</FONT>
</P>
<P><FONT SIZE=3D2>SQL> 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 PL/SQL: Statement =
ignored</FONT>
<BR><FONT SIZE=3D2>2/34 PLS-00357: Table,View =
Or Sequence reference</FONT>
<BR><FONT SIZE=3D2> =
'SQ_EINSATZBERICHTE.NEXTVAL' not allowed in this context</FONT>
</P>
<P><FONT SIZE=3D2>SQL> select SQ_EINSATZBERICHTE.NEXTVAL from =
SQ_EINSATZBERICHTE;</FONT>
<BR><FONT SIZE=3D2>select SQ_EINSATZBERICHTE.NEXTVAL from =
SQ_EINSATZBERICHTE</FONT>
<BR><FONT =
SIZE=3D2> &nb= sp; &nb= sp; &nb= sp; *</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> INET: v.schoen_at_inplan.de</FONT> </P>
<P><FONT SIZE=3D2>Fat City Network Services -- (858) =
538-5051 FAX: (858) 538-5051</FONT>
<BR><FONT SIZE=3D2>San Diego, =
California -- Public Internet =
access / Mailing Lists</FONT>
<BR><FONT =
SIZE=3D2>---------------------------------------------------------------=-----</FONT>