Subject Re: [ib-support] Bug in Calculate Fields. Please Help
Author news.clix.pt
Thanks for the anwser
i'm using dialect 3

yes this
select 157809.0000*1.00000000/1077 from rdb$database

works ok but with my table doesn't work

my table is
CREATE TABLE COMPRAS (
ID INTEGER NOT NULL,
REF VARCHAR(15),
CODEM VARCHAR(5) NOT NULL,
QTD INTEGER NOT NULL,
DATA DATE,
QTDVEN NUMERIC(18,4) NOT NULL,
CAMBIO NUMERIC(18,8) NOT NULL,
PRECOTOTAL NUMERIC(18,4),
INDISPONIVEIS SMALLINT NOT NULL,
CODMOE VARCHAR(3) NOT NULL,
PREUNIMOE COMPUTED BY ((PRECOTOTAL/QTD)),
PREUNIEUR COMPUTED BY ((PRECOTOTAL*CAMBIO/QTD ));


PRECOTOTAL=157809.0000
CAMBIO=1.00000000
QTD=1077

PREUNIMOE is OK
PREUNIEUR is not


Any comment?

thanks i advance

agostinho.cpis@...


""Wilson, Fred"" <fred.wilson@...> escreveu na mensagem
news:E9E4431A916AD21191FD00104B986AEFC24142@......
> Mmmmm, don't know what/how you're doing this, but on FB1.0 the following:
>
> select 157809.0000*1.00000000/1077 from rdb$database
>
> yields
>
> 146.526
>
> here at work.
>
> Best regards,
> Fred Wilson
> SE, Bell & Howell
> fred.wilson@...
>
> -----Original Message-----
> From: news.clix.pt [mailto:agostinho.cpis@...]
> Sent: Friday, September 20, 2002 9:41 AM
> To: ib-support@yahoogroups.com
> Subject: [ib-support] Bug in Calculate Fields. Please Help
>
>
> Hi people
>
> I have a big problem.
> I'm using FB-1.0.0.796-0.64IO.i386.rpm and when I define a calculate field
> like
> NUMERIC(18,4)*NUMERIC(18,8)/INTEGER i got wrong values
>
> eg. 157809.0000*1.00000000/1077=14652.6462
> when the correct value is 146.5264
>
> Thanks in advance
>
> Agostinho Sousa
> agostinhocpis@...
>
>
>
>
>
>
> 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/
>
>
>
> 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/
>
>
>