Fernando Vilas wrote:
> On Thursday 09 July 2009 04:33:31 allan wrote:
<snip>
>>>>>> Probably, I'm missing it, but how do I find from the database, which
>>>>>> accounts have been closed?
>>>>> Open the accounts view and use the "View/Show all accounts" menu item.
>>>> Er, no, Thomas! I mean the "database" database, as in mysql.
>>>>
>>>> allan
>>> select kmmaccounts.id, kmmaccounts.accountname
>>> from kmmaccounts inner join kmmkeyvaluepairs
>>> on kmmaccounts.id = kmmkeyvaluepairs.kvpid
>>> where kmmkeyvaluepairs.kvptype = 'ACCOUNT'
>>> and kmmkeyvaluepairs.kvpkey = 'mm-closed'
>>>
>>> That query should point you in the right direction. Obviously the select
>>> list isn't that important, but the FROM and WHERE clauses are.
>> Hi Fernado
>>
>> Many thanks. I'll give that a wizz later. I must admit I didn't think
>> to look at kmmkeyvaluepairs.
>>
>> allan
>>
>
> Hi Allan,
>
> Many things are stored as kvp, so if you don't see a column for something, it
> is probably in that table. I forgot something in the above query: you
> probably also want to look at kmmkeyvaluepairs.kvpdata in the select list to
> see if it really is closed.
>
> I don't know why an account would have an entry in the kvp table for mm-closed
> if it is not closed, but it is possible. You can always add a constraint to
> the where clause to filter results if you need.
>
OK, Fernando, and thanks again. I did a quick query with your
suggestion and it did look to be OK, but I'll have a further look around
that area.
allan
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at:
http://p.sf.net/sfu/Challenge_______________________________________________
KMyMoney2-developer mailing list
KMyMoney2-developer@...
https://lists.sourceforge.net/lists/listinfo/kmymoney2-developer