473,472 Members | 2,184 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

selecting where count > 1

I have 3500 records in a table - each record has a unique value (KEY_ID
field), but some records share the same value (in a field called
POLE_ID) So, there may be 3 records that have the POLE_ID of 25, 4
records with the POLE_ID of 31, etc. I would like to grab all the
records in the table that share POLE_ID's - that is, select out the
records where there is more than 1 of the same POLE_ID value.
I then want to populate a form using this query.
Is this possible and how?
Thanks
Eric V
Gurnee, IL

Aug 11 '06 #1
2 4972
Select Key_Id, Count(Key_Id)
>From Table1 A Inner Join Table2 B ON A.KeyID = B.PoleID
Group By Key_ID
Having Count(Key_Id) 1

You will need to sub Table1 and Table2 with the table names that you
use.

Hope that helps!
ericv wrote:
I have 3500 records in a table - each record has a unique value (KEY_ID
field), but some records share the same value (in a field called
POLE_ID) So, there may be 3 records that have the POLE_ID of 25, 4
records with the POLE_ID of 31, etc. I would like to grab all the
records in the table that share POLE_ID's - that is, select out the
records where there is more than 1 of the same POLE_ID value.
I then want to populate a form using this query.
Is this possible and how?
Thanks
Eric V
Gurnee, IL
Aug 11 '06 #2
Do a Sum query (click the Sigma icon on top of the screen), group by
PoleID and bring in KeyID as a Count field. Then put a condition on
KeyID 1.

ericv wrote:
I have 3500 records in a table - each record has a unique value (KEY_ID
field), but some records share the same value (in a field called
POLE_ID) So, there may be 3 records that have the POLE_ID of 25, 4
records with the POLE_ID of 31, etc. I would like to grab all the
records in the table that share POLE_ID's - that is, select out the
records where there is more than 1 of the same POLE_ID value.
I then want to populate a form using this query.
Is this possible and how?
Thanks
Eric V
Gurnee, IL
Aug 11 '06 #3

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

Similar topics

1
by: Philo | last post by:
How do I select all <div> tags except those which contain a <table> tag somewhere within them? Example XML: <********************** sample input ***********************> <txtSectionBody>...
5
by: Axial | last post by:
Question: How to select columns from Excel-generated XML when some cells are empty. I've found examples where rows are to be selected, but I can't seem to extrapolate from that to selecting...
1
by: sneha123 | last post by:
There will be some 20 questions and for each question there will be 4 choices.what i want to do is to select multiple answers by clicking the checkbox. i m using asp.net,vb.net pls help me we...
0
by: DAnne | last post by:
I'm trying to do a simple count function in xslt and it's turning out to be extremely painful. I have a report that brings back a set of responses for each question per section in an Audit. I...
1
by: michael.martinek | last post by:
Greetings! I've recently been trying to do something, which apparently looks like it may be a little odd.. I'm not finding anything in the manuals or anywhere on the web where something similiar...
2
by: Catch_22 | last post by:
Hi, I have a stored procedure that has to extract the child records for particular parent records. The issue is that in some cases I do not want to extract all the child records only a...
7
by: Chris | last post by:
I am trying to increase/decrease the value of $_SESSION by 1 after clicking on a link e.g index.php?gotoWk=nxtWk and index.php? gotoWk=lstWk. I'm sure you will get the drift if you look at the code...
2
by: sdanda | last post by:
Hi , Do you have any idea how to improve my java class performance while selecting and inserting data into DB using JDBC Connectivity ......... This has to work for more than 8,00,000...
7
by: swami | last post by:
What is the query for selecting non duplicate elements for eg: no name age 1 siva 28 2 blair 32 3 mano 28 i want to select blair which hasn't got any duplicate...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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...
0
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...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.