TENHO O SEGUINTE CURSOR
declare
cursor c_up is
select
COD_part,
RAMAL,
TELEFONE,
DDD,
DDI,
COD_PAIS,
cod_tipo_tel
from telefone_participante
where cod_part = :contatos.cod_participante;
begin
go_block('telefones');
first_record;
:telefones.RAMAL := null;
:telefones.TELEFONE := null;
:telefones.DDD := null;
:telefones.DDI := null;
:telefones.COD_PAIS := null;
:telefones.cod_tipo_tel := null;
FOR regc_up in c_up LOOP
:telefones.RAMAL := regc_up.RAMAL;
:telefones.TELEFONE := regc_up.TELEFONE;
:telefones.DDD := regc_up.DDD;
:telefones.DDI := regc_up.DDI;
:telefones.COD_PAIS := regc_up.COD_PAIS;
:telefones.cod_tipo_tel := regc_up.cod_tipo_tel;
exit when :system.last_record = 'true';
next_record;
end loop;
first_record;
ELE ESTÁ FUNCIONANDO CERTINHO, AS VEZES CARREGA 4 REGISTROS E COLOCA NO LUGAR CORRETO.
POREM quando O RETORNO DO CURSOR É NULO ELE NÃO APAGA OS REGISTROS QUE POSSUEM LA.
EU COLOCO OS CAMPOS =NULL; ANTES DE ABRIR O CURSOR POREM ELE APAGA APENAS A PRIMEIRA LINHA.
alguém SABE ONDE EU POSSO COLOCAR UMA CONDIÇÃO IF PARA ELE APAGAR TODOS OS CAMPOS PREENCHIDOS.
NO CASO SERIA UM LOOP.
alguém ME AJUDA???
VLW!