Subject RE: [ib-support] Re: problem with "for" in procedure
Author Thomas Steinmaurer
> The QTD is the output. and NOTA a local variable.
> Why this not sucess?
> My table DIARIO_PROVA_ALUNO has severals registers.
>
>
> begin
> QTD = 0;
> FOR SELECT NOTA_PROVA FROM DIARIO_PROVA_ALUNO INTO :NOTA
> DO
> BEGIN
> QTD = QTD+NOTA;
> END
> suspend;
> end

What does "success" mean? Do you get a wrong result, maybe
NULL? If so, is NOTA_PROVA allowed to hold NULL? Once, NOTA
is NULL the iterated summation is NULL.

Thomas.