How to return only first row of data against each primary key

Barry83

New member
Local time
Today, 11:37
Joined
May 13, 2014
Messages
9
Hi

I have an access table which has a key using letters (A,B,C,D...etc). Against each letter there is multiple rows against each letter. However for testing purposes I only need to get a single row against each key and I was wondering if there is a function I could use which would return only the first record of data for each key?

Thanks
Barry
 
Hello Barry83, you might need to use Subquery. Allen Brown has the topic covered : TOP n records per group
 
Hi Paul,

Thanks for your quick response, do you know how this would be achieved using the design view as I am not fully up on my sql?

Cheers
Barry
 
If you provide with the table and interested field names, I could maybe write a Query, which you can copy into your SQL Design view.
 
Is there any generic (key or date or otherwize) way to identify the "First" record?
 

Users who are viewing this thread

Back
Top Bottom