?
Solved

SQL query Axcess

Posted on 2009-04-15
3
Medium Priority
?
327 Views
Last Modified: 2012-05-06
Dear Experts,
I'm using Axcess and I need to write and SQL script that should bring me
unique names and everything on the same line.

I have table which has collomns Name, Phone, Email

when I write SELECT  distinct TableName.Name
FROM TableName;
the result shows only the NAME, but I want to select disctinct only name but I want to see the related information that the name refers to.

For example if the the Name  Mr. Ancek Anderson is unique I want to see all the information about Mr. Ancek Anderson.

how should I write the sql script?

thank you in advance.
0
Comment
Question by:Braveheartli
[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
3 Comments
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 2000 total points
ID: 24145658
Hi Braveheartli,
Try this:
SELECT  TableName.Name, TableName.Phone, TableName.Email
FROM TableName where exists(SELECT distinct TA.Name FROM TableName AS TA where TA.Name= TableName.Name) 

Open in new window

0
 
LVL 1

Author Comment

by:Braveheartli
ID: 24145714
thank you x_com
What does TA mean?
0
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 24145781
Hi Braveheartli,
TA mean alias or it is shorthand notation. You can declare it under different alias for each referred table and reuse it over your query easily. Beside that table alias also used to remove the ambiguity of the column names used in different tables especially if using in complex query.


0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
Recently I was talking with Tim Sharp, one of my colleagues from our Technical Account Manager team about MongoDB’s scalability. While doing some quick training with some of the Percona team, Tim brought something to my attention...
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

801 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