[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Select unique field values

Posted on 2008-10-15
2
Medium Priority
?
271 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 - Microsoft MVP, Access and Data Platform) earned 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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.

649 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