Subject | Re: [ib-support] Re: NUMERIC(18,2) problem |
---|---|
Author | Entrebytes S.L. |
Post date | 2002-05-21T12:09:41Z |
Hi , all
I have been out some time , but seeing your post , i have to say that i have
a similar problem. Much worse , as i have to deal with 2 , 3,4,5 and 6
decimal places for various kinds of quantities (stocks, financial , currency
conversions ..) so the solution i used to be in the safe side (I mean , i
have ib 5.6 and fb 1.0 installations and cannot make a substitution by
contract) and not be nagged by diferent dialects , I implemented a UDF to
force roundings , use a datatype of 7 decimal points and in the triggers , i
check for attempts to store a 7th decimal that is not 0 , throwing a
database error in that case. I'm eager to know different approaches to this
problem.
Hope
Javier RodrÃguez
EntreBytes S.L.
Ontenient , Spain
ERP Development.
I have been out some time , but seeing your post , i have to say that i have
a similar problem. Much worse , as i have to deal with 2 , 3,4,5 and 6
decimal places for various kinds of quantities (stocks, financial , currency
conversions ..) so the solution i used to be in the safe side (I mean , i
have ib 5.6 and fb 1.0 installations and cannot make a substitution by
contract) and not be nagged by diferent dialects , I implemented a UDF to
force roundings , use a datatype of 7 decimal points and in the triggers , i
check for attempts to store a 7th decimal that is not 0 , throwing a
database error in that case. I'm eager to know different approaches to this
problem.
Hope
Javier RodrÃguez
EntreBytes S.L.
Ontenient , Spain
ERP Development.
----- Original Message -----
From: "Daniel Rail" <daniel@...>
To: <ib-support@yahoogroups.com>
Sent: Tuesday, April 30, 2002 8:52 PM
Subject: Re: [ib-support] Re: NUMERIC(18,2) problem
> At 04/30/2002 02:38 PM, you wrote:
> >--- In ib-support@y..., Daniel Rail <daniel@a...> wrote:
> > > Dialect 3.
> >
> >Daniel, what tool did you use to create the table? Does isql.exe
> >also report values of three decimal places? Can you extract the
> >metadata for the table and post here, thanks.
>
> I found the answer in the IB 6 beta documentation. The database was
> originally Dialect 1, so that I could transfer data and structure from
> Paradox to IB, 2 years ago. Then I converted to Dialect 3. In the
> documentation, it mentions that if the precision is 10 and above in
Dialect
> 1, it is DOUBLE PRECISION that is used to store the value and in Dialect 3
> it's INT64. But, if you convert from Dialect 1 to Dialect 3, it still is
> DOUBLE PRECISION. I think that the proper conversion would have to be
> done, because how long would this compatibility can be maintained with
> future versions of Firebird.
>
> Also, this helped me in enforcing the proper rounding for financial data,
> by adding code in my application, so at least it doesn't use the IEEE
> banker's rounding, which my users didn't like. Now, I only need to find
or
> create a UDF to do this kind of rounding.
>
> Any way, thanks for your attention, I should've been able to find this
> information on my own, but somtimes talking about it makes you think
harder
> I guess. But you got to admit, it's still weird to see this behavior.
>
> Have a nice day.
>
>
> Daniel Rail
> Senior System Engineer
> ACCRA Group Inc. (www.accra.ca)
> ACCRA Med Software Inc. (www.accramed.ca)
>
>
>
> 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/
>
>