Solved

Select unique field values

Posted on 2008-10-15
2
256 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 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

More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

705 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