Posts
463
Comments
322
Trackbacks
1
T-SQL: Select where date = max

select t.column1, t.column2, t.column3, t.date from table t with (nolock) where t.column2 like '%AAA%'
and t.date = (select max(date) from table where column2 = t.column2)
order by t.column2

posted on Friday, October 14, 2005 2:31 PM Print
Comments
No comments posted yet.

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 2 and 6 and type the answer here: