473,327 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Getting only the latest ... how?

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.

Alan
Feb 13 '07 #1
1 1496

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: ajaykrishna | last post by:
Hi Could any one tell me what is the latest version of System.Data.OracleClient? Currently I'm using version 1.0.1012.0 in my project which is giving problem of not closing connection eventough...
0
by: Eddy | last post by:
We have a somewhat large .net solution (25+ projects). All the developers using this solution have experienced at one time or another a "Get latest Version (recursive)" on the solution that has NOT...
0
by: Damien | last post by:
Hi, Visual Studio .NET 2003 Visual SourceSafe 6 (6.0d) I'm working in a three person team on a reasonably complex Solution - it currently consists of 9 separate projects (3 of them are plain...
5
by: alanspamenglefield | last post by:
Hello group, I have an SQL statement which pulls data from a table as follows: " SELECT tblSites.sites_siteno, " & _ " tblSites.sites_sitename, " & _ " Sum(tblStockResults.stkr_result) AS...
6
by: Brett Romero | last post by:
I have a DLL "file" reference in my project. The DLL has been updated. I recompile my project but it does not see the DLL updates. I remove and add back the DLL. Now I can see the updates. ...
3
by: retroman80s | last post by:
Everytime I get latest version of my solution or project( with a large number of files), my VS2005 ide shutsdown with no warnings or errors. Anyone else experience the same thing? Any solutions? ...
9
shoonya
by: shoonya | last post by:
i am having a table table : t1 a1 serial a2 varchar(20) now since a1 will be automatically generated so i am using insert into t1(a2) values ('foo'); now i want to get the a1 value...
1
by: mccax | last post by:
Hello, I have the following table (UNIQUOTE) with data in it: Opportunity_Id Rx_Combo Plan_Type B6FG3JX5G $27/$48/$28 HMO B6FG3JX5G $88/$33/$99 HMO B6FG3JX5G $16/$17/$18 HMO There is a...
0
by: Gabriel Genellina | last post by:
En Mon, 05 May 2008 08:26:45 -0300, Vaibhav.bhawsar <bhawsar.vaibhav@gmail.comescribió: Use a Queue object to communicate between threads. The language itself doesn't guarantee anything about...
4
by: tkpmep | last post by:
I've just bought an iMac (OS X 10.5.2, will almost immediately jump to 10.5.3), and am looking to install Python on it, and to use it with XCode, Apple's IDE. Some googling suggests that a number...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.