When I execute the next SQL block, it tells me that I must declare the variable p_name, but I have declared it before.
declare
p_nombre varchar2(200) ;
BEGIN
FOR REG IN (select c1000 INTO p_nombre
from edyficar.cl_clientes2
where cod_seg_mor = 1 and cod_seg_cob = 9 and c8421 = 'S' and segmentacion = 'C1' )
LOOP
dbms_output.put_line(REG.p_nombre);
END LOOP;
END;