View Single Post
  #6  
Old March 23rd, 2010, 06:35 PM posted to microsoft.public.access.queries
Jim
external usenet poster
 
Posts: 39
Default Select unique products per customer?

What I currently get when I run a query is:



Col A Col B

Customer1 Product 1

Customer1 Product 2

Customer1 Product 3



What I need is:



Col A Col B

Customer1 Product1, Product2, Product3





"John Spencer" wrote in message
...
SELECT DISTINCT CustomerID, Product
FROM YourTable

Will give you a unique list of products for each customer with no repeats.

If you want something other than a list, post back and try to post a short
example of the starting data and the end result you desire.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Jim wrote:
Looking at the Northwind database as an example, I need to take all the
products from the Orders table and put them into one field in a table for
each customer so that I end up with each customer and the products
they've ordered in row with no duplicate products for each customer.
Thanks for any help/suggestions.



Jim