|
-
select the most current record
I have searched the web for the answer to my question and tried many queries, but none have returned the results I need. I am hoping someone can help me out. I have a table with mutiple records for each resno. I need to return just one record per resno and that record needs to be the one with the most current date. Here is a sampling of my actual table:
date cono resno artyp_type
2/23/2006 1 814 4
12/6/1995 1 814 0
1/2/1900 2 990 3
1/8/2101 2 990 2
4/20/1994 2 990 1
4/20/1994 5 990 0
8/20/1998 5 990 4
1/1/2011 5 987 3
1/3/2011 5 987 2
5/23/2012 5 987 1
6/19/2012 8 990 0
2/2/2012 8 1213 4
11/18/2011 4 1402 3
9/26/2011 8 1213 2
9/25/2010 3 775 1
4/20/1994 3 778 0
8/20/1998 1 864 4
1/1/2011 2 864 3
1/3/2011 1 1237 2
5/23/2012 1 1237 1
The result I need to return would be:
date cono resno artyp_type
2/23/2006 1 814 4
8/20/1998 1 864 4
5/23/2012 1 1237 1
1/1/2011 2 864 3
1/8/2101 2 990 2
9/25/2010 3 775 1
4/20/1994 3 778 0
11/18/2011 4 1402 3
5/23/2012 5 987 1
6/19/2012 8 990 0
2/2/2012 8 1213 4
I am working with a very large table. Any help is welcome. Thanks!
Similar Threads
-
By Mabel in forum Database
Replies: 3
Last Post: 04-04-2003, 09:11 AM
-
By Andrew McLellan in forum Java
Replies: 3
Last Post: 05-09-2001, 05:34 PM
-
By Nirit Touboul in forum Database
Replies: 7
Last Post: 02-25-2001, 11:34 AM
-
By Rick in forum Database
Replies: 4
Last Post: 01-29-2001, 06:21 PM
-
By woody in forum VB Classic
Replies: 5
Last Post: 04-29-2000, 01:36 PM
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks