Finding Maximum Date In A Column

  • Thread starter Thread starter Tedd
  • Start date Start date
T

Tedd

I am trying to find the maximum date in a column. For
example I have a table that looks like this:

John $100 09/01/01
Jane $300 01/02/03

I want the query to bring back the row with the most
recent date...in this case the second row.

I tried doing a maximum date but it will not let me.

If anyone knows how to do this please let me know.

Thanks.
 
Dear Tedd:

First, I would like you to check your assumptions. You say, "I want
the query to bring back the row with the most recent date."

This statement seems to make the assumption that there is only one row
for any given date. If that is not the case, then the best you can
hope for is to bring back ALL the rows having the most recent date.

Or prehaps your column with date also has times of day recorded.

In any case, the query would be:

SELECT *
FROM YourTable
WHERE YourDate = (SELECT MAX(YourDate)
FROM YourTable)

Replace table and column names with actual names.

I am trying to find the maximum date in a column. For
example I have a table that looks like this:

John $100 09/01/01
Jane $300 01/02/03

I want the query to bring back the row with the most
recent date...in this case the second row.

I tried doing a maximum date but it will not let me.

If anyone knows how to do this please let me know.

Thanks.

Tom Ellison
Ellison Enterprises - Your One Stop IT Experts
 
Back
Top