One record from many based upon single field

K

kemosabe

I have a query that returns more than one record per unique field (AssocID).
I would like to return only 1 (first?) record per unique field. Is there an
easy way to do this? Thanks!
 
M

Michel Walsh

SELECT AssocID, LAST(otherField1), LAST(otherField2), LAST(... )
FROM somewhere
GROUP BY AssocID




Vanderghast, Access MVP
 
J

John W. Vinson

I have a query that returns more than one record per unique field (AssocID).
I would like to return only 1 (first?) record per unique field. Is there an
easy way to do this? Thanks!

SELECT TOP 1 AssocID, thisfield, thatfield, theotherfield
FROM <whatever>
ORDER BY <some field>
 
M

Michel Walsh

Ah, I haven't understood the question like this, and indeed, that returns
ONE record from the whole table.


Vanderghast, Access MVP
 

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

Top