» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > ASP forums and Tips

ASP forums and Tips Talk about ASP Scripting. .net and Cold Fusion as well.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-26-2006, 01:14 PM
rahul rahul is offline
Junior Member
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
rahul is on a distinguished road
Default string count in ASP

Hi,

Is there something wrong with this statement?

SELECT COUNT(applod.CAT) AS CATSR FROM applod WHERE applod.CAT LIKE '%SR%'

This colum has various values such as 1, 2, SR all I want is the number of records that have the value SR in them.

Also are you able to make calulations to recordsets, for example

producta = 20
productb = 30
productc =40

((Sum (producta) + sum (productb) + sum (productc)) / (Sum (productc)))

to give me a percentage?

Thanks in advance for your replies -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-26-2006, 01:15 PM
vikasrocks vikasrocks is offline
OSP Addicts
 
Join Date: Apr 2006
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 19
vikasrocks is on a distinguished road
Default

Try the following

Code:
<%
Dim Checkvalue
CheckValue="SR"
strquery="SELECT COUNT(applod.CAT) AS CATSR FROM applod WHERE applod.CAT=" & Checkvalue
%>

As for the maths on your results, you should be able to write ASP code via loops etc to add up your values, divide them, multiply them etc. -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How does Overture count relate to Google search count? robotec Google 6 08-15-2006 05:53 PM
google count meta tags? menace Google 7 08-08-2006 10:23 AM
count help? blanc MySQL Forums 0 08-03-2006 03:49 PM
count() result query annan MySQL Forums 2 08-02-2006 04:37 PM
Record Count ? lardy ASP forums and Tips 1 12-08-2005 07:19 AM


All times are GMT. The time now is 07:44 PM.