S Sogood Registered User. Local time Tomorrow, 07:19 Joined Apr 10, 2008 Messages 12 Aug 16, 2008 #1 how can i filter a table "date , item name , price" by only show an item name per line with latest price ?
how can i filter a table "date , item name , price" by only show an item name per line with latest price ?
dallr AWF VIP Local time Today, 15:19 Joined Feb 20, 2008 Messages 81 Aug 16, 2008 #2 Try: Code: SELECT T1.* FROM YourTable T1 INNER JOIN (SELECT Max([Date]) As MaxDate, Item FROM YourTable GROUP BY Item) T2. ON (T1.Item = T2.Item AND T1.Date = T2.MaxDate) PS: Please note that the word date is a reserved word in Access Dane Last edited: Aug 16, 2008
Try: Code: SELECT T1.* FROM YourTable T1 INNER JOIN (SELECT Max([Date]) As MaxDate, Item FROM YourTable GROUP BY Item) T2. ON (T1.Item = T2.Item AND T1.Date = T2.MaxDate) PS: Please note that the word date is a reserved word in Access Dane
S Sogood Registered User. Local time Tomorrow, 07:19 Joined Apr 10, 2008 Messages 12 Aug 23, 2008 #3 thanks ~ it works
dallr AWF VIP Local time Today, 15:19 Joined Feb 20, 2008 Messages 81 Aug 23, 2008 #4 NO problem. Dallr