Totals Based on Conditions

  • Thread starter Thread starter RMO
  • Start date Start date
R

RMO

I have a table with various account information including each accounts cash
balances. I'm able to query to pull out just the cash balances along with
the account name. Some of the accounts however need to me netted and this is
where I'm stuck. Is it possible to query so the cash amounts are pulled from
the table while also producing an aggregate number for the particular
accounts that need to be netted? Thanks.
 
As with most problems, there are multiple ways you can approach the solution
including using DSUM, a custom function, and a union query.

An easy way is to create two queries: One for the cash amounts and another
for the aggregate amount, then in one of the queries, join the two queries on
account number.
 
Back
Top