segue um pequeno exemplo:
create or replace procedure test is
cursor c1 is select * from cliente;
type c_collect is table of cliente2%rowtype;
colecao c_collect;
begin
open c1;
loop
fetch c1 bulk collect into colecao;
exit when colecao.count = 0;
forall i in 1..colecao.count
insert into cliente2 values colecao(i);
end loop;
end;
create or replace procedure test is
cursor c1 is select id, nome, sobrenome from cliente;
type c_collect is table of cliente2%rowtype;
colecao c_collect;
begin
open c1;
loop
fetch c1 bulk collect into colecao;
exit when colecao.count = 0;
forall i in 1..colecao.count
insert into cliente2 values colecao(i);
end loop;
end;
ai então eu faço a coleção pegar a estrutura do cursor:
cursor c1 is select id, nome, sobrenome from cliente;
type c_collect is table of c1%rowtype;
forall i in 1..colecao.count
insert into cliente2 values colecao(i); <-- erro nessa linha
será se alguém pode me ajudar;