If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > ORA-01422: exact fetch returns more than requested number of rows

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-12-03, 19:33
pathross pathross is offline
Registered User
 
Join Date: Nov 2003
Posts: 2
ORA-01422: exact fetch returns more than requested number of rows

I tried writing a simple PL/SQL query to force a ORA-01422 error. I do not understand why it is doing this. I would really appreciate some advise coz i'm new to pl/sql


create or replace procedure pro_ins_ord as
value number;
begin
-- i believe this is the line that is giving me the problem
select s_customer_id.nextval into value from s_customer; dbms_output.put_line(value);
end;
/
SHOW ERRORS;
begin
pro_ins_ord;
end;
/

-------------------OUTPUT--------------


SQL> @q5

Procedure created.

No errors.
Input truncated to 1 characters
begin
*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "PATHROSS.PRO_INS_ORD", line 4
ORA-06512: at line 2

----------------------------
Attached Files
File Type: sql q5.sql (207 Bytes, 120 views)
Reply With Quote
  #2 (permalink)  
Old 11-12-03, 20:35
pathross pathross is offline
Registered User
 
Join Date: Nov 2003
Posts: 2
I KNOW THE ANSWER. THANX, NO NEED TO REPLY

NO NEED TO REPLY. THANX.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On