Solved

Select unique field values

Posted on 2008-10-15
2
218 Views
Last Modified: 2012-05-05
I'm currently using the SQL query attached, but I believe this is giving me unique entire records. How can I modify this query to show me only unique records, but by lastname only.

So if this exists in the table:

lastname    ss
smith           1212
smith           5412

then I only want one smith to show up in the results.
I'm using Access 2000
SELECT DISTINCT FP.lastname, FP.ss

FROM FP

ORDER BY FP.lastname;

Open in new window

0
Comment
Question by:isaacr25
  • 2
2 Comments
 
LVL 75
ID: 22725457
How about this:

SELECT Table1.Last AS LastName, First(Table1.First) AS FirstName
FROM Table1
GROUP BY Table1.Last;

mx
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
ID: 22725473
SELECT FP.lastname, First(FP.ss) As MySS
FROM FP
Group By FP.lastname
ORDER BY FP.lastname
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
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…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

747 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

12 Experts available now in Live!

Get 1:1 Help Now