Print Page | Close Window

count the number of times

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=8406
Printed Date: 01 April 2026 at 7:18am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: count the number of times
Posted By: worldwide1504
Subject: count the number of times
Date Posted: 29 December 2003 at 3:03pm

Scenario:

Say that I have a db and I have 10 records in it. Lets say that they are colors. I have:

Red
Blue
Green
Purple
Red
Orange
Red
Gray
Black
Red

Using ASP how would I could I count the number of times that "Red" was entered?




Replies:
Posted By: ljamal
Date Posted: 29 December 2003 at 3:26pm
select count(fieldname) from table where fieldname ='Red'

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: worldwide1504
Date Posted: 29 December 2003 at 7:55pm
Worked. Thanks.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net