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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL OR VBscript help

Status
Not open for further replies.

webware

Technical User
May 27, 2002
6
US
I need a script that will search my database for a 3 digit # in any combination that was most freaquently used,2nd most freq. etc. for example: if the database contains 7 entries 325; 352; 235; 253; 532; 523; 234, the output should show that the most freq. used was 3 #'s containing 325. Can anyone help me with this? I am using microsoft access2002....I am really a designer not a programmer so...Thanks to anyone who can help.
 
Not sure I understand this, if you could reiterate, I would appreciate it... I am sure I can come up with something...

Roy
aka BanditWk
roy@cccamerica.org
 
Maybe this is what you are looking for:

SELECT Table1.field1, COUNT(Table1.field1) as Counted
FROM Table1
GROUP BY Table1.field1
ORDER BY COUNT(Table1.field1) DESC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top