A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Only Once



 
 
Thread Tools Display Modes
  #1  
Old February 21st, 2010, 07:44 PM posted to microsoft.public.access.queries
Sylvia1968
external usenet poster
 
Posts: 1
Default Only Once

Trying to get a list of items to appear only once. I got the query to work,
but it lists dups.
  #2  
Old February 21st, 2010, 08:04 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Only Once

So? What is your question?
What is the SQL of your query?

--
Build a little, test a little.


"Sylvia1968" wrote:

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

  #3  
Old February 21st, 2010, 09:03 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default Only Once

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

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

  #4  
Old February 21st, 2010, 10:30 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Only Once

On Sun, 21 Feb 2010 11:44:01 -0800, Sylvia1968
wrote:

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!
--

John W. Vinson [MVP]
  #5  
Old February 22nd, 2010, 04:41 AM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Only Once

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

--
Build a little, test a little.


"KARL DEWEY" wrote:

So? What is your question?
What is the SQL of your query?

--
Build a little, test a little.


"Sylvia1968" wrote:

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.