Joined: 04 Jun 2012
Online Status: Offline
Posts: 13
Topic: Selecting latest order by time and date Posted: 16 Oct 2012 at 7:33am
I am trying to select the last entry for each order number, ie the last time it was modified. I am using Maximum (tblMyTable.DateOfSale, tblMyTable.Customer) to select the latest for each customer, but if there is more than one on the same day it returns all of them not just the last entry. I have tried forcing it to be a datetime and it just errors out. Anybody have a fresh idea I can try.
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Posted: 16 Oct 2012 at 8:32am
why not group by the order number and then order or group by the dateofsale.
if you set the order to ascending you could just display the value in teh group footer....descending all you would need to do is display the group header
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum