I have the following loop
for i in vt_tpfunc.first..vt_tpfunc.last
loop
vv_string := '
select to_number(to_char(max(mp.dt),''j'')) dt_num
, '||vt_tpfunc(i)||'((mp.vl + nvl(mp.vl_ajuste,0))) vl
, max(mp.tpmovctr_id) tpmovctr_id
, max(pm.nro_parc) nro_parc
, max(pm.tp_parc) tp_parc
, max(pm.dt_vencto) dt_vencto
from mov_parc mp
, prev_movto pm
where mp.dt between '''||ed_dt_inic||'''
and '''||ed_dt_fim||'''
and mp.prevmovto_id = pm.prevmovto_id
and pm.contrfinan_id = '||vt_reg_contrfinan.contrfinan_id||'
and mp.tpmovctr_id = '||vt_tipomovctr_id(i)||'
group by pm.contrfinan_id';
--
execute immediate vv_string
bulk collect into vt_dt_num
, vt_vl
, vt_tpmovctr_id
, vt_nro_parc
, vt_tp_parc
, vt_dt_venc;
--
end loop;
That is, at the end of the loop, the vectors do have the values ??of the last result of the loop.
I need it at the end of the loop, the vectors have all the values ??of the loop = D
intendam ??
vlw ....