Subject Re: [ib-support] Please Help - Calculate fields(urgent)
Author news.clix.pt
Thanks for the anwser
i'm using dialect 3


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@...




"Paul Reeves" <paul@...> escreveu na mensagem
news:3D8B53F8.4040404@......
> news.clix.pt wrote:
> > 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
> >
>
> Well, it works for me with dialect 3.
>
> What dialect are you using?
>
>
> BTW, you do know that the Linux 64 bit file i/o is broken in that build,
> don't you? You can carry on using it, as long as you don't try and grow
> the database beyond the 4 Gb file limit.
>
>
> Paul
> --
>
> Paul Reeves
> http://www.ibphoenix.com
> Supporting users of Firebird and InterBase
>
>
>
>
>
> 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/
>
>
>