Only Once

S

Sylvia1968

Trying to get a list of items to appear only once. I got the query to work,
but it lists dups.
 
J

John Spencer

It kind of depends on what you mean by dups.

It could be as simple as changing the query by adding the Distinct predicate.

In query design view, set the queries Unique Values property to yes.
== open query in design view
== select View: Properties from the menu
== Click on a blank area of the top section that displays the tables
== Change Unique Values to Yes

IN SQL view, add the word DISTINCT after the word SELECT

SELECT DISTINCT SomeField
FROM SomeTable
ORDER BY SomeField

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
J

John W. Vinson

Trying to get a list of items to appear only once. I got the query to work,
but it lists dups.

Correct the error in your query.

If you would like help doing so, please post a description of the table and
open your query in SQL view and post the SQL text here... we can't fix what we
can't see!
 
K

KARL DEWEY

Maybe like this --
SELECT YourTable.*, Count([SomeField]) AS CountOfSomeField
FROM YourTable
WHERE Count([SomeField]) =1;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top