Just wanted to pop in and say "thank you very much".
I found this while searching for a way to restrict my queries to only
certain types. In my case it was that my prepaid card has a limit on how
much it can be topped up from credit card sources, and I'm targeting to hit
that limit every month to maximize certain benefits. Now I have a query
which tells me exactly how much I've topped up so far each month. Something
like:-
SELECT
year, month, account, sum(cost(position))
WHERE
account ~ 'Assets:Banking:PrepaidCard'
and joinstr(other_accounts) ~ 'Liabilities:CreditCards'
and NOT(joinstr(other_accounts) ~ 'Assets:Banking:PrepaidCard')
GROUP BY year, month, account
The final line under WHERE is to exclude transactions between prepaid cards
where I have a split transaction.
On Sun, Dec 29, 2019 at 9:42 PM 'Patrick Ruckstuhl' via Beancount <
[email protected]> wrote:
> What I've done before that might work in your case is something like
>
> where joinstr(other_accounts) ~ ".*;Foo"
>
> Basically use a regexp against the joined string of the other accounts.
>
> On December 29, 2019 11:35:07 AM GMT+01:00, Red S <[email protected]>
> wrote:
> >Could you replace "X in other_accounts" with "number > 0"?
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/853DCCA4-B50D-48CC-B6B2-60C01B3769D5%40ch.tario.org
> .
>
--
You received this message because you are subscribed to the Google Groups
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/CAGQ70esjjDFVSuJG9K4sHuvmVRmN-L7UptzjgSuj9Riii5pZBA%40mail.gmail.com.