Subject | RE: [ib-support] Really strange calculating behaviour of IB |
---|---|
Author | Wilson, Fred |
Post date | 2002-02-14T14:41:34Z |
One way, is as we do it. We store all currency values in an column of type
INTEGER. The actual work unit of this column is determined by the client,
via a rules class, from a set of rules, also stored in the database. This
varies by country. For sites here in the US, the unit is $0.001 (tenths of a
cent) for US postage. Outside of the US, it can be something else. We never
have rounding problems ;)
We do the same for weights, store them in a INTEGER column. Again, the
actual unit that's stored is determined by the client via a rules class.
Here in the US the mail weights are 0.1 oz (tens of an ounce). Elsewhere it
may be grams or fraction of a gram. The database doesn't care, and again, we
never run into rounding problems
Best regards,
Fred Wilson
SE, Bell & Howell
fred.wilson@... <mailto:fred.wilson@...>
-----Original Message-----
From: guido.klapperich@... [mailto:guido.klapperich@...]
Sent: Thursday, February 14, 2002 5:59 PM
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] Really strange calculating behaviour of IB
Guido
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://rd.yahoo.com/M=218512.1856015.3360178.1269402/D=egroupweb/S=17050077
09:HM/A=928901/R=0/*http://ad.doubleclick.net/clk;3788034;6800959;v%3fhttp:/
/www.verisign.com/cgi-bin/go.cgi?a=b228473240057000>
<http://us.adserver.yahoo.com/l?M=218512.1856015.3360178.1269402/D=egroupmai
l/S=1705007709:HM/A=928901/rand=766895868>
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .
INTEGER. The actual work unit of this column is determined by the client,
via a rules class, from a set of rules, also stored in the database. This
varies by country. For sites here in the US, the unit is $0.001 (tenths of a
cent) for US postage. Outside of the US, it can be something else. We never
have rounding problems ;)
We do the same for weights, store them in a INTEGER column. Again, the
actual unit that's stored is determined by the client via a rules class.
Here in the US the mail weights are 0.1 oz (tens of an ounce). Elsewhere it
may be grams or fraction of a gram. The database doesn't care, and again, we
never run into rounding problems
Best regards,
Fred Wilson
SE, Bell & Howell
fred.wilson@... <mailto:fred.wilson@...>
-----Original Message-----
From: guido.klapperich@... [mailto:guido.klapperich@...]
Sent: Thursday, February 14, 2002 5:59 PM
To: ib-support@yahoogroups.com
Subject: Re: [ib-support] Really strange calculating behaviour of IB
> For the moment I am just glad that I have not used scaled numerics inAnd how do you store money-values ?
> my apps - I just spend lots of time writing triggers etc to perform
> explicit rounding. It may not be perfect, but so far it has been
> consistent.
>
Guido
Yahoo! Groups Sponsor
ADVERTISEMENT
<http://rd.yahoo.com/M=218512.1856015.3360178.1269402/D=egroupweb/S=17050077
09:HM/A=928901/R=0/*http://ad.doubleclick.net/clk;3788034;6800959;v%3fhttp:/
/www.verisign.com/cgi-bin/go.cgi?a=b228473240057000>
<http://us.adserver.yahoo.com/l?M=218512.1856015.3360178.1269402/D=egroupmai
l/S=1705007709:HM/A=928901/rand=766895868>
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .