I want to display only unique records

B

bladelock

I trying to type a query that will let me display fields: MR#, Name, Sex,
Age, Ans BUT, I want only to display unique (no Duplicates) from only MR#.
Example:

Original Table
MR# Name Sex Age Ans
123 Joe M 35 Yes
123 Joe M 35 No
125 Tom M 31 Yes
130 Sue F 39 Yes
130 Sue F 39 No

Query Should look like this: (where only unique MR# are displayed)
123 Joe M 35 Yes
125 Tom M 31 Yes
130 Sue F 39 No
 
J

Jeff Boyce

I'm not seeing it...

How are YOU deciding to see the "Yes" record for Joe, but the "No" record
for Sue? I can't see any other attributes/criteria on which to base this
decision.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
K

KARL DEWEY

But the records are not unique. For MR# 123 the Ans field is Yes once and No
in the next record - not unique.
How do you want the query to decide which of the two records to display?
 
B

bladelock

Sorry, I was really looking for the uniqueness of the MR#. I didn't know it
would take thw whole record accross.
 
B

bladelock

So I can't just make MR# unique?

Jeff Boyce said:
I'm not seeing it...

How are YOU deciding to see the "Yes" record for Joe, but the "No" record
for Sue? I can't see any other attributes/criteria on which to base this
decision.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
K

KARL DEWEY

Ok, the do this --
SELECT [MR#], First([Name]) AS FName, First([Sex]) AS Gender, First([Age])
AS Age_, First([Ans]) AS Response
FROM YourTable
GROUP BY [MR#];
 

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