Filter Out Duplicates

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

Guest

My datbase looks like this:

ID Date Time
1 20060103 125712
2 20060103 144102
3 20060104 111036
4 20060104 111036
5 20060104 131417
6 20060104 131417


For a given date, can a query filter out the duplicate times ? In the above
example, record 4 and 6 would be filtered out.

Thank you in advance
 
It depends on what you mean by filter out and which fields you want to show
in the results. Also, are there two fields for date and time or just one
field containing both the date and time

One method that may do what you want.

SELECT Min(ID) as TheID, Date, Time
FROM YourTableName
GROUP BY Date, Time

I'm assuming that your field names are generic. If not, I would suggest
that you rename them if possible. Both Date and Time are reserved words and
can cause problems
 

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

Back
Top