Okay, that makes sense, but I'm thinking that you won't be able to do the 
grouping at the SQL level in that case.

As Jochem noted, GROUP BY can only put records together where all the 
grouped fields match, and the assumption is that all other columns are 
summarized or otherwise aggregated.  In short, you still have to do 
something with the other columns (id, site, far_end, site_type, phase, lat, 
long, city, region, sites_status) if you try to group on cluster.  
Depending on what you need to do with the data on output, you might want to 
ORDER BY cluster and then do grouping on output (just a table-based listing 
example):

<table>
<cfoutput query="clusters" group="clust">
<tr>
<th colspan="8">#clust#</th>
</tr>
<cfoutput group="site">
<tr>

<td><a href="index.cfm?event=site.view&id=#id#">#site#</a></td>
<td>#far_end#</td>
<td>#site_type#</td>
<td>#phase#<td>
<td>lat: #lat# long: #long#</td>
<td>#city#</td>
<td>#region#</td>
<td>#site_status#</td>
</tr>
</cfoutput>
</cfoutput>
</table>

 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323521
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to