Good morning,
I have several queries that give various values. I wish to find the sum of all the queries ordered by date.
Here is a sample:
SELECT ControlDates.BalanceDate, Sum(Deposit-Withdrawal) As Balance
FROM Transactions, ControlDates
WHERE TransDate<=BalanceDate
GROUP BY ControlDates.BalanceDate;
SELECT ProfitLoss.PLDate, Sum((ProfitLoss!Gain-(ProfitLoss!Gain*0.2))-ProfitLoss!InterestMargin) AS Netgain
FROM ProfitLoss
GROUP BY ProfitLoss.PLDate;
SELECT RunningBalance!BalanceDate AS Balance, RunningBalance!Expr2*0.000054794 AS ManagementFee
FROM RunningBalance
ORDER BY RunningBalance!BalanceDate;
There are several other queries. I am after a single number resulting from the queries. Let me know if I am going about this the wrong way.
Thank you.
I have several queries that give various values. I wish to find the sum of all the queries ordered by date.
Here is a sample:
SELECT ControlDates.BalanceDate, Sum(Deposit-Withdrawal) As Balance
FROM Transactions, ControlDates
WHERE TransDate<=BalanceDate
GROUP BY ControlDates.BalanceDate;
SELECT ProfitLoss.PLDate, Sum((ProfitLoss!Gain-(ProfitLoss!Gain*0.2))-ProfitLoss!InterestMargin) AS Netgain
FROM ProfitLoss
GROUP BY ProfitLoss.PLDate;
SELECT RunningBalance!BalanceDate AS Balance, RunningBalance!Expr2*0.000054794 AS ManagementFee
FROM RunningBalance
ORDER BY RunningBalance!BalanceDate;
There are several other queries. I am after a single number resulting from the queries. Let me know if I am going about this the wrong way.
Thank you.