Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding Data that shows up multiple times

Status
Not open for further replies.

Shane0013

Programmer
Feb 6, 2003
6
US
I have a table with 35,000 records of account numbers, I need to filter out all those except the ones that show up 3 times or more...Im slightly new and I have no idea how to do this
 
select accountNumber
from accounts
group by accountNumber
having count(*) >= 3
 
swampboogie...I may have misunderstood..It does bring up only a few accounts..but when I go back to make sure each one shown has at least 3 entries..they don't..I have it set up like this
Field:Account Number
Table: tblAcctNum
Total: Group By
Criteria: Count (*)>=3

Is this correct?
 
I know zilch about Access queries, so I can't really say if that's okay.

My assumption was that your table looks like

AccountNumber ! accountDate ! other
------------- ! ----------- ! -----
1234567890123 ! 20030102
1234567890123 ! 20030103
1234567890123 ! 20030104
1234567890123 ! 20030105
3456789012345 ! 20030102
3456789012345 ! 20030103

and in this case you would like to get back 1234567890123

Can you run the SQL query directly and see if it works as intended?
 
I take it all back swamp...you were/are right. Thanks for the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top