Sean A Corfield wrote: > > Integer is the safer way to represent money - as pennies - because that > way you avoid rounding errors. Financial applications should never use > floating point to represent dollars (or whatever). If you take 0.00 and > add 0.01 a hundred times, you're quite likely to get something which > does not equal 1.00 because of inherent inaccuracies in floating point > representation.
<nitpick> I believe the rounding baheviour of SQL is not specified to the point where you can say a priori that math will not introduce errors with any datatype. You always have to check the manual, because even with operations involving 2 exact numeric values the outcome is often implementation-defined. </nitpick> Common sense says that any exact numeric value should be OK, so NUMERIC, DECIMAL, INTEGER and SMALLINT will work. Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.