Hi:
I have a joined query from two tables. I want ro preserve ALL the data from the RIGHT table while summing the data from a field in the LEFT table having a specific criteria from a third field. Here's the code:
The query runs fine (showing all data from the "ActionType " table) when I remove the "HAVING ((([6 Export OwnOcc Loan Activity].Occupancy)="1" ))" criteia. It does not show all the data from the "ActionType " table with that criteria in place.
Can someone tell me how to fix it to show ALL data from the "ActionType " table?
I have a joined query from two tables. I want ro preserve ALL the data from the RIGHT table while summing the data from a field in the LEFT table having a specific criteria from a third field. Here's the code:
Code:
SELECT ActionType.[Action Type], Sum([6 Export OwnOcc Loan Activity].[Action Type]) AS [SumOfAction Type] FROM [6 Export OwnOcc Loan Activity] RIGHT JOIN ActionType ON [6 Export OwnOcc Loan Activity].[Action Type] = ActionType.[Action Type] GROUP BY ActionType.[Action Type], [6 Export OwnOcc Loan Activity].Occupancy HAVING ((([6 Export OwnOcc Loan Activity].Occupancy)="1"));
The query runs fine (showing all data from the "ActionType " table) when I remove the "HAVING ((([6 Export OwnOcc Loan Activity].Occupancy)="1" ))" criteia. It does not show all the data from the "ActionType " table with that criteria in place.
Can someone tell me how to fix it to show ALL data from the "ActionType " table?
Comment