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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return the TWO most recent dates

Status
Not open for further replies.

douggy

Technical User
Jan 18, 2001
78
GB
If have four dates for one record, how do I return the TWO most recent ones.

I would really appreciate a pointer here.

Kind regards Mark
 
Dear Mark,

try this:

Select top 2 field1, field2 from sourcetable order by datefield desc

regards Astrid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top