Make sure you read this message as UTF-8 (the list still strips the 
charset from the content-type header).


Charlie Griefer wrote:
> There are some people here who suggest that it makes the database more
> self documenting, and I don't disagree with that...  but if there are
> indeed accuracy issues I think that outweighs the self-documenting
> aspect :)

Would you consider this an accuracy issue?

create table test (mtype money);
insert into test (mtype) values ('€ 30000');
insert into test (mtype) values ('$ 30000');
select * from test;

I do :)


> What I'm not fully understanding is if those same accuracy issues
> exist with Decimal(19,4).

Just like money decimal is an exact datatype, i.e. no subtle rounding 
errors at the 8+ digit are introduced. That does not mean there are no 
algorithmic rounding errors. I demonstrated a very clear one where 
stripping the currency symbol gave 30000 euro and 30000 dollar the same 
values. There are other possible algorithmic errors such as rounding 
between operations instead of only at the end. (Or not rounding between 
operations if that is what is required for your currency.)


> And if they do, is the solution to just be
> judicious in the use of Round() functions?  or is using Float the
> "preferred" option.

float is never the preferred solution when accuracy matters because it 
adds the rounding problems to all the algorithmic problems.

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307191
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to