declare
lv_emp_id number;
lv_emp_name varchar2(40);
lv_collection objtyp_collection;
i number :=0;
begin
loop
lv_emp_id := NULL;
lv_emp_name := NULL;
utl_file.get_line(lv_file_handle, lv_new_line);
lv_emp_id := substr(lv_new_line,1,5);
lv_emp_name := substr(lv_new_line,6,30);
i := i + 1;
lv_collection.append;
lv_collection(i).emp_id := lv_emp_id;
lv_collection(i).emp_name := lv_emp_name;
end loop;
end;
|