Hi All,  

I am using the following query to extract data from an excel spreadsheet

 

 

<CFQUERY NAME="nsw_howards_book"  DATASOURCE="howards_book">

SELECT BorrowerPcode, Pcode, locality

from "zD_ExportServiceFeeTemp$", "postcodes$"

where BorrowerPcode like '2%'

and BorrowerPcode like Pcode

group by BorrowerPcode, Pcode, locality                    

order by Pcode, BorrowerPcode, locality                    

</cfquery>

 

 

The following code outputs the data  as required and counts the existence of the number of records within each group using the count formula, then groups the output by pcode and indicates how many records exist for that post code

 

<cfoutput query="nsw_howards_book" group="Pcode">

<cfoutput>

<cfset count=#count#+1>

</cfoutput>

<tr>

<td><div align="center">#count#</div></td>

<td><div align="center">#BorrowerPcode#</div></td>

<td><div align="center">#locality#</div></td>

<cfset percentage=(#count#/#vic_howards_book.recordcount#)*100><td><div align="center">#numberformat(percentage, '99.99')#%</div></td>

</tr>

<cfset count=0>

</cfoutput>

 

I am trying to figure out how to modify my code so that the output is grouped and sorted based on the number of individual records that exist for each postcode



Regards

Claude Raiola
B.Econ (Acc), B.Hot.Mngt.

Websites:
www.AustralianAccommodation.com
www.SAMARIS.NET
www.WebSiteSolutions.com.au
Mobile: 0414 228 948

 
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to