Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 latest record
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

23 Posts

Posted - 01/24/2014 :  15:46:00  Show Profile  Reply with Quote
Hi friends ,

I need your help, i have table has column called [last modified date] it has time too , i need your assistant to get the [latest modified date] for particular ID , there are many updates to the ID and i just need the latest date.
[PAX ID] | [Last Modified Date]
1 2013-01-02 18:23:00
1 2013-01-02 11:42:00
3 2013-01-01 09:00:00
3 2013-01-08 16:05:00
5 2013-01-01 09:09:00



Almighty SQL Goddess

38200 Posts

Posted - 01/24/2014 :  15:53:53  Show Profile  Visit tkizer's Homepage  Reply with Quote
select [pax id], max([last modified date])
from yourtable
group by [pax id]

Please do yourself a favor and fix those column names! There should be NO spaces.

Tara Kizer
SQL Server MVP since 2007
Go to Top of Page

Starting Member

23 Posts

Posted - 01/24/2014 :  16:08:39  Show Profile  Reply with Quote
Thanks my friend
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000