dates in query

B

Brian L

Hello. How could I select the record with the latest date from a group of
records?
Lets say there are multiple records for a single order with specific time
stamps for order status. I only want to return the latest time stamp. thanks.
 
D

David Ferguson

Try the following SQL


SELECT OrderTable.OrderNo, Max(OrderTable.TimeStamp) AS MaxOfTimeStamp
FROM OrderTable
GROUP BY OrderTable.OrderNo;
 
Top