Latest Date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Okay,
Age old problem... Looking for the latest date in a table.

Our team has come up with 2 methods... Both work, but there is debate on
which is more efficient/preferable.

Just looking for thoughts from others that may have done the same thing


Method #1:

SELECT TOP 1 myTable.Datestamp
FROM myTable
WHERE (((myTable.Datestamp) Is Not Null))
ORDER BY myTable.Datestamp DESC;




Method #2

SELECT Max(myTable.Datestamp) AS MaxOfDatestamp
FROM myTable
ORDER BY Max(myTable.Datestamp);


Just looking for pro's and cons to either approach..
 
Back
Top