Solved

Select the first occurrence of a each multiple key record in an Access 2007 table.

Posted on 2013-06-01
1
337 Views
Last Modified: 2013-12-06
I have a table that looks like the following....

A                       B                                       C
Art                  Red                                    Vase
Art                  Blue                                   VASE
Art                  Pink                                    Truck
Joe                  Red                                     Blouse
Mike               Green                                 Moon

I WANT THE QUERY OUTPUT TO BE

Art                    Red                                  Vase
joe                    Red                                  Blouse
Mike                 Green                              Moon
0
Comment
Question by:aselbyjr
1 Comment
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 39213788
You can do this in Access:

Select a, first(b), first(c)
From yourtable
Group by a


But it loses its meaning if the table is reordered.  It is better to have a field such as an auto number to define order of record entry.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now