See below:
BEGIN
OPEN cr_vl_limite_resp_aux(ldt_pesquisa);
FETCH cr_vl_limite_resp_aux INTO lvl_lim_pesquisa;
CLOSE cr_vl_limite_resp_aux;
EXCEPTION
WHEN NO_DATA_FOUND THEN
select vl_limite_resp
into lvl_lim_pesquisa
from tb_item_transp_nac
where cd_pessoa = PCd_Pessoa;
WHEN TOO_MANY_ROWS THEN
lvl_lim_pesquisa := 0;
END;
Another ridiculous thing here is to put TOO_MANY_ROWS in this cursor! Imagine: If the guy chose to do a cursor it's kind of obvious that he expects to return more than one line (in order to treat line per line). Hheheheh