By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,871 Members | 2,337 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,871 IT Pros & Developers. It's quick & easy.

Getting only the latest ... how?

P: n/a
Hello World:

I have a new task at work.
I have to process a mainframe report (a text file), and put it into an
Access 2003 database.
When I get the report, it looks like this:
Account Sub_Name Sub_Date
123456789 Smith 1/16/2005
123456789 Smith 1/20/2006
123456789 Smith 1/12/2007
987654321 Lopez 12/15/2006
234567891 Jones 12/10/2006
234567891 Jones 12/10/2006
345678912 Krebbs 1/9/2007
876543219 Chang 2/1/2007
Notice the duplicated Account and Sub_Name entries.
I want only 1 entry, the one with the latest date.
In cases where there are duplicated (or more) dates for an Account, I only
want 1 entry.

There are over a million records in this report.
I need a way to extract only the latest and non-duplicated records.

What is the best way to achieve what I want to do?
Thanks in advance for any help offered.

Feb 13 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a

where's the catch? Just use a totals query. Group by Account and
Sub_Name and get the max of date. Then you'll only get one record for
each (Account, Sub_Name) combination.

Feb 13 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.