title: I want to continue looping even when no-data-found and use index by..getting 'no data found error
body: <p>I am using sqldeveloper. I have to use INDEX BY for this program.</p>
  
  <p>Department table has <code>ID's 10,20,50,60,80,100</code>. </p>
  
  <p>Currently the program prints dept_names for id's 10 and 20 and then quits.</p>
  
  <pre><code>DECLARE
  TYPE dept_table_indexby is TABLE OF
    departments.department_name%TYPE
    INDEX BY PLS_INTEGER;
  dept_table_arr dept_table_indexby;
  v_department_id  departments.department_id%TYPE := 10;
  BEGIN 
    for i in 1..10 loop
    BEGIN
      select department_name into dept_table_arr(i)
      from departments
      where department_id = v_department_id;
      v_department_id := v_department_id + 10;
    EXCEPTION
      WHEN no_data_found THEN
      --null; /* tried this option, still control exits the loop */
      dbms_output.put_line('in loop : ' || dept_table_arr(i));
    end;
    end loop;
  
    for i in dept_table_arr.first..dept_table_arr.last loop
    dbms_output.put_line('department name: outside loop ' || dept_table_arr(i));
    end loop;
  
  end;
  </code></pre>