By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,190 Members | 1,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,190 IT Pros & Developers. It's quick & easy.

selecting where count > 1

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.