Unique Codes

J

JethroUK©

How do i produce unique list a batch numbers + order them in desc of last
used. Tried:

"SELECT DISTINCT QUALS.[Batch] FROM QUALS ORDER BY [last updated] DESC; "

issue an error due to a conflict

trouble i'm having is producing unique batch numbers, since the inclusion of
[last updated] which is always unique (date/time stamp)
 
S

strive4peace

Hi Jethro,

ORDER BY has a conflict with DISTINCT...

try this:

SELECT QUALS.[Batch], Max([last updated]) as LastUpdate
FROM QUALS
GROUP BY QUALS.[Batch]
ORDER BY Max([last updated]) DESC;


Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote programming and Training
strive4peace2006 at yahoo.com
*
 
Top