Solved

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

Posted on 2013-06-01
1
332 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …

760 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

19 Experts available now in Live!

Get 1:1 Help Now