access query to find unique values

T

tonyrulesyall

I am using Access XP. I would like to identify unique values in
tables with a query.

This is how the raw data looks:
Customer Date
A 10/1/2008
A 10/1/2008
A 10/2/2008

This is what I would like the output to look like:
Customer Date
A 10/1/2008
A 10/2/2008
 
N

nata

try this:
SELECT Table1.Customer, First(Table1.Date) AS Date
FROM Table1
GROUP BY Table1.Customer, Table1.Date;
 
J

John Spencer

SQL would look like the following. The DISTINCT key word "rolls up" records
that have identical fields displayed.

SELECT DISTINCT Customer, [Date]
FROM [Your Table]

How to do this in query design view instead of in SQL view:

In query design view, click on a blank area in the top of section (next to a
table NOT ON a table). In the Query Properties dialog, change Unique Values
to Yes.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top