Do not show duplicates

DavidWRouse

Registered User.
Local time
Today, 20:37
Joined
Jul 24, 2003
Messages
42
I just want to run a query that doesn't show duplicates.

I have a table with 2 fields:
Payroll Number, Name

Some Payroll numbers have been duplicated.

i.e.

Payroll - Name
Number
001 - Bob
002 - Dave
001 - BOB
003 - Jim

I just want to run adisplay a list with 1 of each pay number
Payroll - Name
Number
001 - Bob
002 - Dave
003 - Jim
 
There are a few ways to do this, simplest might be a totals query where you Group By payroll number and choose First, Last, Max, or Min for the Name field.
 
Isn´t it enough just to group by the payroll number?

Fuga.
 
Thanks, Just tried it works a treat,

Could not get my head around it.
 
Well here's a confusing thing. When I read your post, I hadn't initially noticed that
001 - Bob
and
001 - BOB
were the cases you wanted to show only one of. Do you consider these two records to be the same and therefore want to only show one of?

If so, it's way easier than I made it seem. You can use a regular select query and set the query properties so that Unique Values is set to true. Access does not normally make case distinctions in queries, so "Bob" is considered the same as "BOB", "bOb", as well as "BOb".

Now, if it's the case that you'll get data like this:
001 - BOB
and
001 - Bill
and you only want to show one payroll number and one name, then my posted solution will do that.
 

Users who are viewing this thread

Back
Top Bottom