How can I do a quick count within a certain column of a certain text that it
contains?

For instance I have a column called AST which may either be empty or contain
text such as "AST".

I would like to get a count of the occurrences of the "AST" text and display
a number of the occurrences. I tried the COUNT() tag but it counts all the
rows.

Any help appreciated. Thanks.

Robert O.

-------------------------------------------------
This some of my ROUGH coding, but my mind has writers block today:

<CFSET AST_COUNT = 0>

<cfquery name="getcount" datasource="wweb">
SELECT AST FROM wweb
Where AST = 'AST'

</CFQUERY>


<cfoutput query="getcount">
<html>

<head>
<title></title>

AST: #astcount#


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to