DECLARE
esito Recall45_debug.COL_ESITO%TYPE;
CURSOR c1 IS
select * from Recall45_debug where col_esito is not null and record_status=5;
BEGIN
for riga in c1 LOOP /*inizio il ciclo per ogni scheda in c1 */
SELECT MAX(ID_STORICO) as Max into num from recall_storico where colonna5= riga.colonna5;
IF num = 0 then /* la scheda e un'anteprima */
DBMS_OUTPUT.PUT_LINE(err || riga.COLONNA5);
ind:=ind+1; /*incremento il numero di schede con anomalia */
END IF;
fin qui tutto bene
SELECT tipo_esito into es FROM DETT_ESITI_OUTB WHERE COD_CAMPAGNA='45' AND cod_esito= esito;
poi a questa select si blocca x questa istruzione AND cod_esito= riga.col_esito;, però se mette and cod_esito= '2' non va in errore
Com'è possibile che non riesce ad estrarre il dato ESITO mentre riesce ad estrarre benissimo nella selct precendete riga.colonna5??
Aiutooooooooooo