Thanks for the replies. I don't need the number of occurances
of each specialties - I simply need to know how many specialties
there are and then split them in half.
This may be the long way around -but it is what I did...
<cfquery name="rsGetSpecialties" >
SELECT s.spec_Sort,s.spec_ID, s.spec_Name, b.bus_Name,
b.bus_ID, b.bus_Pcity, b.bus_PState
FROM (tbl_businesses as b INNER JOIN tbl_SpecBusRel as sb ON
b.bus_ID = sb.specbus_busid) INNER JOIN tbl_specialties as s ON
sb.specbus_specid = s.spec_ID
ORDER BY s.spec_Sort, b.bus_Name
</cfquery>
<cfset specs = valuelist(rsGetSpecialties.spec_ID)>
<cfquery name="rsListSpecialties">
SELECT spec_ID,spec_Name
FROM tbl_specialties
WHERE spec_ID in(#specs#)
ORDER BY spec_Name
</cfquery>
<cfset middle = int(rsListSpecialties.recordcount/2)>
<cfset specs = valuelist(rsListSpecialties.spec_Name)>
<cfset middle = listgetat(#specs#,middle)>
then displayed like this...
<td valign="top" width="50%">
<cfoutput query="rsGetSpecialties" group="spec_Name">
<h2><a class="specialty" href="javascript;"
onclick="dwfaq_ToggleOMaticDisplay(this,'#spec_ID#');return
document.MM_returnValue">#spec_Name#</a></h2>
<div id="#spec_ID#" style="display:none">
<cfoutput><a
href="#request.details#?bus_ID=#bus_ID#">#bus_Name#
(#bus_PCity#, #bus_PState#)</a><br /></cfoutput>
</div>
*****This is the line that does the splitting *****
<cfif spec_Name EQ middle></td><td
valign="top" width="50%"></cfif>
</cfoutput>
</td>
As for removing the extraneous cfoutput --> I thought that
I needed that in order to show the material within the grouped
data. HOw does CF know what data to repeat and what data to not
repeat in a grouped output? I will have to look this one up some
more.
thanks for the help