Sequence error?? [message #373054] |
Sat, 24 March 2001 04:32 |
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 |
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
|
|
|
|
|
|
|
|