Find a record

P

PowerM

I need to find a records (not values) from database which has newest date of Delivery for all Drivers.
I know how to find a date but i need to find whole record because of need to update it.
Table could be like that:
OrderID, Driver, DoD
1,1,#01/02/2004#
2,1,#01/03/2004#
3,1,#01/04/2004#
4,2,#01/02/2004#
5,2,#01/03/2004#
6,2,#01/04/2004#
7,2,#01/05/2004#
8,3,#01/02/2004#
9,3,#01/03/2004#
10,3,#01/04/2004#
11,3,#01/05/2004#
12,3,#01/06/2004#
Results should be:
3,1,#01/04/2004#
7,2,#01/05/2004#
12,3,#01/06/2004#
or just 3,7,12

How SQL clause should like please write any working example
 

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

Top