recovery
Braindead
Braindead at diablops.com
Thu Nov 1 15:38:44 EDT 2007
On Thu, 01 Nov 2007 10:34:45 -0400
Derek Atkins <warlord at MIT.EDU> wrote:
> hendrik at topoi.pooq.com writes:
>
<snip>
> > In the XML, they set the unit for the account to 1/3. Then they
> > just represent it as 1.
> > Or set the unit to 1/6. Then represent it as 2.
>
> 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;
>
> Maybe you can? I honestly don't know.
You certainly can, at least we do things like that all the time in Firebird.
Just thought I'd mention that ;-)
More information about the gnucash-user
mailing list