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

Counting Records

Status
Not open for further replies.

NormB

MIS
Joined
Jul 2, 2001
Messages
1
Location
US
I would like to be able to count how many time the catagory field contains a certain value. The following SELECT statement generates an error. Any suggestion?

SELECT catagory, rec_count=count(*) from tablename GROUP BY catagory
 
SELECT category, count(*) as Tot
FROM MyTable
Group By category Terry M. Hoey
th3856@txmail.sbc.com
While I don't mind e-mail messages, please post all questions in these forums for the benefit of all members.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top