Query Syntax Help

11 views
Skip to first unread message

Jasel17212

unread,
Feb 1, 2023, 10:19:21 AM2/1/23
to hledger
I need a bit of help with hledgers query syntax.

I would expect the following query to only return accounts that match Wells AND Icell, but as you can see it seems to act as an OR instead.

$ hledger bal acct:Wells acct:Icell  
  $997.31  Assets:Banking:Wells Checking
  $923.25  Assets:Banking:Wells Checking (Icell)
  $163.08  Assets:Banking:Wells Savings
  $700.90  Assets:Banking:Wells Savings (Icell)
   $37.76  Assets:Banking:Wells Trust
  $710.84  Liabilities:Credit Cards:AMEX - Icell


Suggestions?

Thanks
JL
Message has been deleted

Jasel17212

unread,
Feb 1, 2023, 2:57:19 PM2/1/23
to hledger
Worked it out on my own.

Just in case it's helpful to others, here's the solution that worked for me:
 
$ hledger bal acct:Wells.+Icell 

Thanks
JL

Simon Michael

unread,
Feb 1, 2023, 3:48:15 PM2/1/23
to hledger
That's a good solution (acct: is the default prefix and usually omitted, just FYI).

This also works: hledger bal wells not:not:icell




-- 
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hledger/d2be9215-1f94-4dcd-b864-a5fbff7c4e48n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages