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
----------------------------