Sogood
08-16-2008, 04:40 AM
how can i filter a table "date , item name , price"
by only show an item name per line with latest price ?
by only show an item name per line with latest price ?
|
View Full Version : Filter table by name with the latest price Sogood 08-16-2008, 04:40 AM how can i filter a table "date , item name , price" by only show an item name per line with latest price ? dallr 08-16-2008, 05:19 AM Try: 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 Sogood 08-22-2008, 10:15 PM thanks ~ it works dallr 08-22-2008, 11:27 PM NO problem. Dallr |