Gasman
Enthusiastic Amateur
- Local time
- Today, 20:01
- Joined
- Sep 21, 2011
- Messages
- 17,251
Hi all,
I am really puzzled by this, so must be doing something stupid, but cannot see what it is?
I have a table of trades and want only those for the 26/05/2016 and their totals?
I've created the query whose code is
Yet I get every date in the table grouped and totalled?
What am I missing please?
I am really puzzled by this, so must be doing something stupid, but cannot see what it is?
I have a table of trades and want only those for the 26/05/2016 and their totals?
I've created the query whose code is
Code:
SELECT [SVS Comms].Date, [SVS Comms].[Buy/Sell], [SVS Comms].[Trade Type], Sum([SVS Comms].[Share Cost]) AS [SumOfShare Cost], Sum(Round([Share Cost]*0.02,2)) AS TCComm, [SVS Comms].Stock
FROM [SVS Comms]
GROUP BY [SVS Comms].Date, [SVS Comms].[Buy/Sell], [SVS Comms].[Trade Type], [SVS Comms].Stock
HAVING ((([SVS Comms].Date)=#5/26/2016#) AND (([SVS Comms].[Buy/Sell])="buy") AND (([SVS Comms].[Trade Type])="AIM")) OR ((([SVS Comms].[Trade Type])="BONDS"));
What am I missing please?