Filter Out Duplicate Entries

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My data looks like this (about 200,000 records)


26-Apr 604190000047407.00
26-Apr 604190000047407.00
26-Apr 060419083050567I
26-Apr 060419083050567I
27-Apr 604190000047407.00
27-Apr 604190000047407.00
27-Apr 060419083050567I
27-Apr 060419083050567I

For a given day, is it possible to filter out the duplicate entries ?

Thank you in advance
 
Hi, Carl.
For a given day, is it possible to filter out the duplicate entries ?

If by "filter out the duplicate entries" you mean to only display one record
of a duplicate set, not eliminate all duplicated entries, for a specific
day, then try:

SELECT RecordDate, Data
FROM tblTest
WHERE (RecDate = "27-Apr")
GROUP BY RecordDate, Data;

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 
Thank you. If I would like to run this on the entire database (not just for a
single day) but since the entry can repeat for different days , how could I
modify yhe query ?

The result I am trying to get would be:

26-Apr 604190000047407.00
26-Apr 060419083050567I
27-Apr 604190000047407.00
27-Apr 060419083050567I
 
Hi, Carl.
If I would like to run this on the entire database (not just for a
single day) but since the entry can repeat for different days , how could
I
modify yhe query ?

Just remove the condition, the WHERE clause, so that the query applies to
the entire table. Like this:

SELECT RecordDate, Data
FROM tblTest
GROUP BY RecordDate, Data;

Lynn's suggestion has the same effect, as long as you only select the
relevant fields (which I was careful to do in the query above also):

SELECT DISTINCT RecordDate, Data
FROM tblTest;

Both queries are non-updateable, however. If you use a GROUP BY or DISTINCT
query as a Record Source for a form, you won't be able to edit, add, or
delete the records. If you need to update these records, then you need to
get rid of the duplicates, not just filter them out.

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
 
Back
Top