Home » RDBMS Server » Server Administration » Sequence error??
Sequence error?? [message #373054] Sat, 24 March 2001 04:32 Go to next message
Arjun V
Messages: 14
Registered: March 2001
Junior Member
I hv a sequence:

create sequence s1
start with 1
increment by 1
nocache;

The sequence is created.
It works good at sql prompt with:-
select s1.nextval from dual ;
(gives output)

I m using this sequence in pl/sql to get auton no. generation
eg

declare
vno number;
begin
select s1.nextval into vno from dual;
dbms_output.put_line(vno);
end;

i m getting error- exact fetches more than reuested nos of rows.

Please help me y i m getting this error??

Help will be appreciated.

Arjun
Re: Sequence error?? [message #373059 is a reply to message #373054] Sat, 24 March 2001 10:13 Go to previous messageGo to next message
Mayank Paranjape
Messages: 2
Registered: March 2001
Junior Member
It seems dual table has more then one row.

On SQL prompt

run following query

set feedback on
"select * from dual";

if you get more then one row then somebody has inserted rows in dual table (intentationaly or accidently).

Report Database administratory to delete one row.

Dual table should have only one row and one column

I hope this will solve you problem.

Mayank
Re: Sequence error?? [message #373070 is a reply to message #373054] Mon, 26 March 2001 07:21 Go to previous messageGo to next message
Arjun V
Messages: 14
Registered: March 2001
Junior Member
But teh procedure created to get the value of nextval works well....
Re: Sequence error?? [message #373071 is a reply to message #373054] Mon, 26 March 2001 09:53 Go to previous messageGo to next message
Mayank Paranjape
Messages: 2
Registered: March 2001
Junior Member
Can you mail me Pl?SQL code that you have written to gen nextval. ALso check how many rows you have in dual table.

Thanks
Re: Sequence error?? [message #373104 is a reply to message #373054] Tue, 27 March 2001 15:27 Go to previous messageGo to next message
jacob
Messages: 6
Registered: October 2000
Junior Member
It code is prefectly working in sql and pl/sql
Re: Sequence error?? [message #374451 is a reply to message #373054] Wed, 13 June 2001 06:12 Go to previous messageGo to next message
C NARAYAN
Messages: 2
Registered: June 2001
Junior Member
While restoring through DFSMSdss utility (S/390 system) we got ADRY3530I - Sequence error.
Plese help me to resolve this issue.
Thanks
cnarayan@infy.com
Re: Sequence error?? [message #374452 is a reply to message #373054] Wed, 13 June 2001 06:12 Go to previous message
C NARAYAN
Messages: 2
Registered: June 2001
Junior Member
While restoring through DFSMSdss utility (S/390 system) we got ADRY3530I - Sequence error.
Plese help me to resolve this issue.
Thanks
cnarayan@infy.com
Previous Topic: Send query values to a table
Next Topic: Re: Try this SQL/PLSQL problem again...
Goto Forum:
  


Current Time: Fri Jul 05 15:40:37 CDT 2024