Dustin Stanley
asked on
MS Access Need Help understanding The Group By Function In a Query
I want to make sure I am understanding the Group By completely in MS Access. Basically I am importing CSV files into Access and I want to Group Customers by several fields. The same customer could have several shipping addresses. Therefore I want to make a record in Access for each shipping address of the customers and if there is several duplicate Shipping Address in the CSV file, I want Access to Group them. The fields I am trying to Group on is:
Company Name
First Name
Last Name
Address Line 1
Address Line 2
City
State
Zip Code
Country
Email address
Basically if any one of these field values is different from the previous record. I want access to show a record in the query results and if it is the EXACT same all the way down the line of fields. I want Access to group all of the similar ones and just show one record.
I have attached a photo of my query grid below and thank you for the help:
Company Name
First Name
Last Name
Address Line 1
Address Line 2
City
State
Zip Code
Country
Email address
Basically if any one of these field values is different from the previous record. I want access to show a record in the query results and if it is the EXACT same all the way down the line of fields. I want Access to group all of the similar ones and just show one record.
I have attached a photo of my query grid below and thank you for the help:
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Can you use SELECT DISTINCT in the design view or do you have to use SQL only? Thanks for the help.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect and thank you for the help.
For these properties to a customer record.
Open in new window
Choosing Country to uniquely identify customers, then you are looking for one record summarizing all customers of each country.Open in new window
Wait, need the Email address,Then the unique identifier expanded to Country, [Email address], hence your query will be:
Open in new window
I want to show customers in country with different [Email address]Open in new window
Have a go, and comment back if more help is required.
You may upload a few records with required output.