« Return to Thread: Closed Accounts on Database

Re: Closed Accounts on Database

by Fernando Vilas-2 :: Rate this Message:

Reply to Author | View in Thread

On Wednesday 08 July 2009 16:48:57 allan wrote:

> Thomas Baumgart wrote:
> > On Wednesday 08 July 2009 17:56:15 allan wrote:
> >> Hi
> >>
> >> 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.

--
Thanks,
Fernando Vilas
fvilas@...



------------------------------------------------------------------------------
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

signature.asc (204 bytes) Download Attachment

 « Return to Thread: Closed Accounts on Database