Connecting Tech Pros Worldwide Forums | Help | Site Map

selecting where count > 1

ericv
Guest
 
Posts: n/a
#1: Aug 11 '06
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


Jeff L
Guest
 
Posts: n/a
#2: Aug 11 '06

re: selecting where count > 1


Select Key_Id, Count(Key_Id)
Quote:
>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:
Quote:
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
ManningFan
Guest
 
Posts: n/a
#3: Aug 11 '06

re: selecting where count > 1


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:
Quote:
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
Closed Thread