jonwood wrote:
> I've done very little programming related to currency (dollars, etc.) and I'm
> wondering if I need to worry about rounding errors. Since SQLite doesn't
> appear to have a currency type, I had planned on using REAL instead. But I
> have a lot of reports to print out and I could see rounding errors with
> REAL.
> 
> Another alternative would be to use an INTEGER to store the number of
> pennies. But I don't really know how much of an issue this is and I'd
> appreciate any comments from anyone who has dealt with it.
> 

You are almost certainly better off using an integer data type for 
currency calculations. If not you will end up with small, but disturbing 
errors in your reports.

HTH
Dennis Cote


_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to