Home » RDBMS Server » Server Administration » Sequence in PL/SQL
Sequence in PL/SQL [message #372955] Tue, 20 March 2001 00:30 Go to next message
Arjun V
Messages: 14
Registered: March 2001
Junior Member
I hv simple sequence:-

sql>create sequence s1
start with 1
increment by 1
nocache;

when i give command in SQL*Plus i get the output
sql> select s1.nextval from dual;
1

till this it is ok

when i m using in the application like below i m getting the error

sql> DECLARE
V_NO NUMBER;
BEGIN
SELECT S10.NEXTVAL INTO V_NO FROM DUAL;
DBMS_OUTPUT.PUT_LINE(V_NO);
END;

DECLARE
*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at line 4
---
please help me solve the above problem.
thanks in advance..

Arjun V.
Re: Sequence in PL/SQL [message #372981 is a reply to message #372955] Tue, 20 March 2001 17:59 Go to previous message
Priyadarshini
Messages: 10
Registered: July 2000
Junior Member
Hi Arjun,

You have created a sequence by name S1 initially but within your anonymous procedure you are giving the sequence name as S10... Check that !!!

Rgrds
Previous Topic: Can we play with strings?
Next Topic: Re: ORA-01562
Goto Forum:
  


Current Time: Sun Jun 30 01:49:42 CDT 2024