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

SQL Count Statement

Status
Not open for further replies.

Garabaldi

Technical User
Jan 16, 2002
61
CA
Hi all...

Quick Question.

I want to use asp to go into an SQL Server Table and count and print the amount of records in that table that have a field equal to a certain value.

Example:
----------
This is the table:
tb_Help

Counter | Employee# | Name
--------------------------------------
1 | 0001 | Bob
2 | 0002 | Jane
3 | 0001 | Bob
4 | 0004 | Bubba


I'm trying to get the asp to go to the records and count every record that has the Employee# = 0001.

Any help???
 
SQL statement should looks like this:

Select Employee#, Count(Employee#)
from tb_Help
where employee# = '0001'

hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top