Re: Querying transactions based on multiple accounts (from accountA to accountB)
On Mon, Jun 12, 2023 23:09:31 +0200, Martin Michlmayr wrote: > * Ankur Sinha [2023-06-12 22:04]: > > I'm looking for a way to list/filter transactions based on multiple > > accounts. For example, I'd like to see transactions where money moved > > from Account A to Account B (or vice versa). > > ledger bal Assets:A -l "any(account =~ /Assets:B/)" Works like a charm. Thanks Martin! -- Thanks, Regards, Ankur Sinha "FranciscoD" (He / Him / His) | https://fedoraproject.org/wiki/User:Ankursinha Time zone: Europe/London -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/qmgh5wdckmss5orqpm7oqog2oz32ukkwgtwuznwyvx3b7airui%40lqk2wyl6dl3z. signature.asc Description: PGP signature
Re: Querying transactions based on multiple accounts (from accountA to accountB)
* Ankur Sinha [2023-06-12 22:04]: > I'm looking for a way to list/filter transactions based on multiple > accounts. For example, I'd like to see transactions where money moved > from Account A to Account B (or vice versa). ledger bal Assets:A -l "any(account =~ /Assets:B/)" -- Martin Michlmayr https://www.cyrius.com/ -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/20230612210931.GA154455%40jirafa.cyrius.com.
Querying transactions based on multiple accounts (from accountA to accountB)
Hi folks, I'm looking for a way to list/filter transactions based on multiple accounts. For example, I'd like to see transactions where money moved from Account A to Account B (or vice versa). I found this post, but it doesn't quite work for me. It gives various errors related to the dates/year field: https://money.stackexchange.com/questions/154316/how-can-i-identify-all-transfers-from-account-a-to-account-b-in-ledger-cli I thought perhaps an `and` query would work: `Account A and Account B`; but that still seems to list all transactions in with either `Account A` or `Account B` are used (like an "or" query?). Any pointers would be most appreciated (even to the docs :)) $ ledger --version Ledger 3.2.1-20200518, the command-line accounting tool Copyright (c) 2003-2019, John Wiegley. All rights reserved. This program is made available under the terms of the BSD Public License. See LICENSE file included with the distribution for details and disclaimer. -- Thanks, Regards, Ankur Sinha "FranciscoD" (He / Him / His) | https://fedoraproject.org/wiki/User:Ankursinha Time zone: Europe/London -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/nlfteskumfbellq2c4nq6m2n6xfxafn4aqc2xr7l5wtsfbnsno%40hyy2budebxrd. signature.asc Description: PGP signature