Hey guys, I have been working on the query running against MS access database.
The table has multiple columns and two of them (which are vital to this query) are Date and ItemN ( suggesting Item number).
There are multiples which show multiple entries for single itemN, for example.
item 1 has three date entries as compared to item 2 which has one entry, corresponding to one item number.
The query condition is to fetch the distinct item number against its latest entry in date.
I am trying to use this query:
SELECT field name1, field name2,...field name9, max(date) as dt FROM (SELECT * FROM TABLEname ORDER BY DATE DESC) group by fieldname1, fieldname2, ..fieldname9, dt;
Am I doing it right?
December 17, 2007 6:44 PM
April 18, 2013 8:01 PM