-
SQL Query Help - Selecting, out of near duplicates, the most recent record
Hi guys, thanks for taking a look.
I have two tables in SQL 2005, let's say Name and Address. Name has the columns 'NameID' 'FirstName' and 'LastName'. Address has 'NameID' 'Line1' 'Line2' and 'LastConfirmed'.
What I want to do is
select FirstName,Lastname,Line1,Line2 from Name a
join Address b
on a.NameID = b.NameID
But I only want the most recent record in the Address table to be returned, based on something like 'order by LastConfirmed desc'. Any ideas how to do this?
Restrictions:
1. The table I am working with cannot be modified/columns added.
2. No additional permanent tables can be created.
Thanks!
Similar Threads
-
By Daniel Reber in forum Database
Replies: 0
Last Post: 09-13-2002, 08:21 AM
-
By Ken D. in forum VB Classic
Replies: 1
Last Post: 09-06-2002, 08:31 AM
-
By Sreeni in forum Database
Replies: 0
Last Post: 05-28-2002, 04:40 AM
-
By Daniel in forum Database
Replies: 5
Last Post: 08-20-2001, 04:00 PM
-
By Dave in forum VB Classic
Replies: 3
Last Post: 05-25-2001, 02:32 PM
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
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|