One record from many based upon single field

  • Thread starter Thread starter kemosabe
  • Start date Start date
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!
 
SELECT AssocID, LAST(otherField1), LAST(otherField2), LAST(... )
FROM somewhere
GROUP BY AssocID




Vanderghast, Access MVP
 
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>
 
Ah, I haven't understood the question like this, and indeed, that returns
ONE record from the whole table.


Vanderghast, Access MVP
 
Back
Top