recovery

Ian Lewis ianmlewis at gmail.com
Thu Nov 1 23:43:27 EDT 2007


> Umm.. I understand exactly how gnucash stores it, but you miseed my
> point.  The person I was responding to was suggesting that numbers get
> stored as decimal, and I was asking THAT person how you would suggest
> that we store a decimal number that represents the number 1/3.  I know
> very well how gnucash does it -- it stores TWO integers that represent
> the rational number.  But moving that over to a SQL database might be
> more problematic.  I'm not sure if you can do something like:
>
>   SELECT * from Split where Split.amount_num/Split.amount_denom = 1/3;

Afaik, doing mathematical operations like this is standard SQL. I hope
it should work on any SQL database. It certainly works on MySQL,
PostgreSQL and MSSQL.

-- 
Ian Lewis
ianlewis at member.fsf.org
http://www.ianlewis.org/


More information about the gnucash-user mailing list