Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01423: error encountered while checking for extra rows in exact fetch

612097Feb 27 2008 — edited Feb 29 2008
ERROR at line 1:
ORA-01423: error encountered while checking for extra rows in exact fetch
ORA-01722: invalid number
ORA-06512: at "Department.get_emp_name", line 57
ORA-06512: at line 14

Hi

The above are the error messages I am running into and I am not sure what it means at all. I do have a query which select few rows into cursor
cursor c_requested is
select * from departments where emp_id in (1, 2, 3)

now from these rows I again creating a query dynamically
open c_requested;
loop
fetch c_requested into deptID, name, authorized; -- declared variables
exit when c_requested%NotFound;
sqlstring := 'Select name from employees where deptID = ' || deptID || ' and Authorized = ' || authorized;
begin
execute immediate sqlstring into description; -- declared variable
exit;
exception when no_data_found then
description := 'FILTER_OUT';
end;
end loop;
close c_requested;

This code is inside a function get_emp_name(). When I execute this function I am getting the above errors. I really appreciate all your help. Please let me know if you need more information.

Thank you very much
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 28 2008
Added on Feb 27 2008
4 comments
11,603 views