Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

top 10 selection ... (quickie)

Status
Not open for further replies.

callhandler

Programmer
Oct 25, 2002
11
US
I have a simple table with dates in it (lots of them).

How do I write a query to select the 10 most recent dates in the list?

 
Hi there,

SELECT top 10 myTable.myDate
FROM myTable
ORDER BY myTable.myDate DESC

Cheers,
Dan
 
OK, I apologize. I over simplified the problem.

The date field has data in the format:
mm/dd/yy hh:mm (ie it has time as well)

I need to select the 10 most recent days, not the 10 most recent fields.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top