Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to query a table for uniqueness? 3

Status
Not open for further replies.

BotCow

Programmer
Jul 10, 2003
58
US
Okay I have a list with numerous names. Some of these names have duplicates and some do not. I would just go through all of them and filter out the duplicates myself but there are too many entries. How do you query the table so that you get a list with each name once.

eg:
BOB
LENNY
CARL
LENNY
LENNY
HOMER

to

BOB
LENNY
CARL
HOMER
 
try adding the word "distinct' after the word select in your select statement.

for example,

select distinct entries from....


to make this change, go to the query design view of the particular query, go to View - SQL View, and make the change there.

hope this helps you.
 
Create a query picking off your names and any other data you want along with them. Go to design view of your query, right click the gray area of the query design. From the menu, click on Properties. Click in the Unique Values box and from the drop down menu select YES. Close the sheet and run your query. You should see just unique names.

Neil
 
You could use a select query with grouping on the name.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top