Re: Select the most recent date

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Greg Linwood (g_linwoodQhotmail.com)
Date: 04/26/04


Date: Mon, 26 Apr 2004 15:24:55 +1000

There are a few ways of writing this query, but a simple way is to use a
sub-query to qualify the where predicate.

select *
from yourtable
where datecolumn in (select max(datecolumn) from yourtable)

Regards,
Greg Linwood
SQL Server MVP

"Donald Pickering" <donpick1@hotmail.com> wrote in message
news:108p6lp8bra9i40@corp.supernews.com...
> Running SQL Server 2000 on Windows 2000 server.
>
> I have a table where one field is a date field.
> I want to find the records with the most recent date in them.
> What SELECT command will find the most recent date?
>
>
>