Solved

ACCESS

Posted on 2014-12-09
5
191 Views
Last Modified: 2014-12-10
How to find Unique Records in ACCESS
0
Comment
Question by:lux sat
  • 2
  • 2
5 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 40490379
A little more detail would be helpful?  This isn't a homework assignment, is it?

Are you trying to identify only those records in a table which are unique for one or more fields, or are you simply trying to return a set of records with unique values.  If the latter, you can use the DISTINCT predicate in your SELECT statement:

SELECT DISTINCT Field1, Field2 FROM your Table

Or you might want to use a GROUP By clause:

SELECT Field1, Field2 FROM yourTable GROUP By Field1, Field2
0
 

Author Comment

by:lux sat
ID: 40490388
No it is not hw. but I am new to ACCESS. I need to eliminate Identical rows

Ex.

1  2 3
1 2  3
3 4 5

i just want my result set as
1 2 3
3 4 5
0
 
LVL 84
ID: 40490957
As Dale mentioned, more detail is helpful.

Are those values in the SAME field, or in DIFFERENT fields? How you go about showing distinct records depends greatly on that.

Also, you mention you want to "eliminate" identical rows. Does that mean you want to remove them, or just not show them in your query?

Note that Access includes a "Find Duplicates Query Wizard" which may be helpful. to use that, click the Create tab, and select "Query Wizard". You'll see the Duplicates Query in that list. Select that, and follow the prompts.
0
 

Author Comment

by:lux sat
ID: 40491453
Dale/Scott
I have attached the sample table as an image. I want to eliminate Row 3 ( 2 A B C).

ROW 1 is the fieldnames in my table.
TABLEIMAGE.JPG
Thanks,
LAKSHMI
0
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 40491564
Either of the methods I described above (using DISTINCT) or using a GROUP BY Clause will return a recordset that only has one result for A,B, C.  However, if you want to keep Field1 in the query, and that field is a unique value, it will force all rows to be returned with DISTINCT.  However, you might try:

SELECT MIN(Field1) as FirstOccurance, Field2, Field3, Field4
FROM yourTable
GROUP BY Field2, Field3, Field4
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
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…
Familiarize people with the process of utilizing SQL Server functions 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 Microsoft Ac…

757 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

21 Experts available now in Live!

Get 1:1 Help Now