473,804 Members | 3,481 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Show only records with Count = 1 in Query Results

Might not have explained this correctly in subject, but query results
look like below:

Name ID Phone

Bill 001 123
Bill 001 234
Bill 001 456
Sam 002 999
Mary 003 888
For the above, which is now a "unique values query" I only want to
show records where there is only 1 ID. So with the above, I'd only
want Sam and Mary output. I would not want Bill to be output at all
since he has 3 different phone numbers which is why he's showing up 3
times. I thought I was supposed to tell Access if Count = 1 for ID to
display but that's not working or I'm not doing correctly.

Thanks,
Darrell

Jun 5 '07 #1
1 2541
you need to create a query that does a count of name, then join that query
with your current query and only show those records with a count of 1

<ve***@aol.comw rote in message
news:11******** **************@ q69g2000hsb.goo glegroups.com.. .
Might not have explained this correctly in subject, but query results
look like below:

Name ID Phone

Bill 001 123
Bill 001 234
Bill 001 456
Sam 002 999
Mary 003 888
For the above, which is now a "unique values query" I only want to
show records where there is only 1 ID. So with the above, I'd only
want Sam and Mary output. I would not want Bill to be output at all
since he has 3 different phone numbers which is why he's showing up 3
times. I thought I was supposed to tell Access if Count = 1 for ID to
display but that's not working or I'm not doing correctly.

Thanks,
Darrell

Jun 6 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2641
by: Bryan Zash | last post by:
When querying a bit field, I am encountering a problem with MS SQL Server returning a larger number of records for a table than the actual number of records that exist within that table. For example, my customer table has 1 million unique records, so the results of the following query are as such: select count(customer_nbr) from customer = 1,000,000 There is bit field in the customer table that denotes whether a
4
2642
by: news.online.no | last post by:
In a query, I need too be able to show if a parent record has a child record. Using the query in a combo box too select record in a form. Thanks :)
6
2142
by: John | last post by:
I've got a single table I need to query to return records that have no "related records." Table dataset example: 1. John, Biology 2. Dave, Math 3. Susan, Biology 4. Betty, Sociology The query should return this dataset:
4
2786
by: Jim | last post by:
I have a form that is using a query for the control source. The query put the data in order of TOP 20. I've added an extra textbox in the form and want to be able to automatically rank the records and award points for the top averages. what would be the best approach to assigning values according to the ranking? Thanks in advance.
2
12082
by: Pete | last post by:
I need to create a single query (Not a SQL query) against a single table that counts the number of records in the table, where the single field "tmp" contains specific string values If the field contains "AAA" the count is X. if the field contains "CCC" the count is Y. if the field contains "Stop" then count is Z. I have tried several ways and can not seem to get any where. I get the same count for all string values. Can some one...
4
31259
by: kdubble | last post by:
Hi I am trying to get the results of a query to show only unique student records (not duplicates). Is there a simple way to make the criteria field do this? I am not too familiar with SQL. I have a student_info table, a session_info table, and a services_to_students table. What I'd like to do is query the tables to get a list of all students served between certain dates. Now, of course, between those dates,
1
1340
by: holmm | last post by:
Feel free to critise/comment. I've been slightly thrown in at the deep end! I'm building a query to count the number of test results that are unapproved, Out of spec, null etc per manufacturing site by Date(current month, last 12 months or all others). I have the query returning results correctly but the only problem is it won't return 0's for the manufacturng sites that have none of the above. Query: SELECT ...
2
3899
by: banderson | last post by:
Hello, I have a data entry form for a table with information about buildings and am having a problem making a combo box do what I want. I would like to make the combo box show a list of unique bldg mgmt company names and then to open a building management company form to show all records with this name, so the user can find the correct branch location to select. Then, upon closing the building management company form, the active/selected record...
1
1491
rsmccli
by: rsmccli | last post by:
Hello, using Access 2002. I was wondering if someone knows a way to show the results of an append or update query. When you run, let's say, an Append Query, Access notifies you that 10 records are about to be appended. Then Access says that only 8 were appended because of key or index rule problems. Is there a way to have Access show either which records were appended or which records were unable to be appended? I figure that you could...
0
9710
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10593
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10340
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10085
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7626
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6858
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5663
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3830
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3000
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.