ORA-01403: no data found
983397Feb 17 2013 — edited Feb 17 2013Would someone please tell me where is my mistake here...
=====================================
SET SERVEROUTPUT ON
DECLARE
TYPE dept_table_type IS TABLE OF
departments%ROWTYPE INDEX BY PLS_INTEGER;
my_dept_table dept_table_type;
max_count NUMBER(4,0):= 30;
BEGIN
FOR i IN 10..max_count
LOOP
SELECT * INTO my_dept_table(i) FROM departments
WHERE department_id = i;
END LOOP;
FOR i IN my_dept_table.FIRST..my_dept_table.LAST
LOOP
DBMS_OUTPUT.PUT_LINE(my_dept_table(i).department_name);
END LOOP;
END;
/
=====================================
I am getting the error...
===============
Error report:
ORA-01403: no data found
ORA-06512: at line 9
01403. 00000 - "no data found"
*Cause:
*Action:
===============
Thanks for your help!