Subject | RE: [ib-support] Re: problem with "for" in procedure |
---|---|
Author | Thomas Steinmaurer |
Post date | 2003-05-15T20:11:53Z |
> My original code is this below.Can you show us the stored procedure header too?
> The result of the query of ther "for" give me 37 records.
> The result of the output variable Y is 4. The right result for this
> variable is not for.
>
> begin
> SOMA = 0.0;
> Y = 4;
> FOR
> select
> DPA.NOTA_PROVA
> from DIARIO_PROVA_ALUNO DPA
> where
> DPA.NOTA_PROVA is not null and
> DPA.ID_CURSO = :CURSO and
> DPA.ID_DISCIPLINA = :DISCIPLINA and
> DPA.ID_FASE = :FASE and
> DPA.ID_TURMA = :TURMA and
> DPA.NUMERO_PROVA = :NUMERO_PROVA
> into :NOTA_PROVA
> DO BEGIN
> Y = Y+1;
> X = NOTA_PROVA - MEDIA;
> POTENCIA = POWER(X,2);
> SOMA = SOMA + POTENCIA;
> END
> SOMA = SOMA / qtd_aluno;
> DPM = SQRT(SOMA);
> suspend;
> end
You'd best posting the entire stored procedure DDL
including the input/output parameters.
How do you use the stored procedure? As selectable or
executable stored procedure?
Regards,
Thomas.