Unique Codes

  • Thread starter Thread starter JethroUK©
  • Start date Start date
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)
 
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
*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top