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..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top