Subject | RES: [ib-support] division in stored procedure |
---|---|
Author | Marcelo Pitanga |
Post date | 2003-04-07T18:30:44Z |
try
declare variable resultado numeric(5,2)
....
resultado = (qtd_minuto * qtd_modulo)/60
.....
insert into DISCIPLINA_HISTORICO (ID_DISCIPLINA, CARGA_HORARIA)
values (:disciplina, :resultado );
Regards
Marcelo
declare variable resultado numeric(5,2)
....
resultado = (qtd_minuto * qtd_modulo)/60
.....
insert into DISCIPLINA_HISTORICO (ID_DISCIPLINA, CARGA_HORARIA)
values (:disciplina, :resultado );
Regards
Marcelo
> ----- Mensagem original -----
> De: ronaldorezende [SMTP:ronaldinho79@...]
> Enviada em: segunda-feira, 7 de abril de 2003 15:01
> Para: ib-support@yahoogroups.com
> Assunto: [ib-support] division in stored procedure
>
> I have a stored procedure that have two variables. I need to do some
> operations with their, and put the result in a table. Whats wrong in
> my example? (this is not the complete code). An error is generated in
> this operation: (qtd_minuto * qtd_modulo)/60)
>
>
> declare variable qtd_modulo smallint;
> declare variable qtd_minuto smallint;
>
> .....
>
> insert into DISCIPLINA_HISTORICO (ID_DISCIPLINA, CARGA_HORARIA)
> values (:disciplina,((qtd_minuto * qtd_modulo)/60) );
> The column CARGA_HORARIA is NUMERIC(5,2).
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>