Solved

I want to eliminate Duplicate Records  with minimum time

Posted on 2014-09-17
4
122 Views
Last Modified: 2014-09-17
I am including a sample database.  Trying to query to eliminate Duplicate Records with min time.  
I tried just the two fields---[ID]&[TakenTime] and works but add other fields it doesn’t.

Table:DupRecords
ID      MinOfCMMT_ID      TakenTime
6100174005      174005      9:12:00 AM
6100174005      174018      9:26:00 AM
6100174012      174012      9:18:00 AM
6100174012      174019      9:27:00 AM



Query1
SELECT DupRecords.ID, DupRecords.MinOfCMMT_ID, Max(DupRecords.TakenTime) AS MaxOfTakenTime
FROM DupRecords
GROUP BY DupRecords.ID, DupRecords.MinOfCMMT_ID;
I would appreciate any help!
DupRecords.mdb
0
Comment
Question by:ca1358
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 13

Expert Comment

by:AielloJ
ID: 40328515
ca1358:

Can you provide an example of what you expect the results to be?

Best regards,

AielloJ
0
 

Author Comment

by:ca1358
ID: 40328524
6100174005      174018      9:26:00 AM
6100174012      174019      9:27:00 AM
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 40328631
try this query


SELECT T.*
FROM DupRecords AS T
INNER JOIN
(SELECT ID, Max(TakenTime) AS MaxOfTakenTime
FROM DupRecords
GROUP BY ID) As T1
ON T.ID=T1.ID and T.TakenTime=T1.MaxOfTakenTime
0
 

Author Closing Comment

by:ca1358
ID: 40328650
Awesome, Thank you!!
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question