I am trying to distinctly count the number occurences of jobs for
different agencies in my application. The query spits back all records
giving the total in the system being 47 and listing it 47 times against
each agency. This obviously is not what I want. How do I get the output
to read
Agency 1 3
Agency 2 6
Agency 3 7
and so forth......
The query below produces the following output.
<cfquery name="ActiveAgency" datasource="OIMDBADM">
select agency
from oimdbadm.assigned
where completed = 'Incomplete'
</cfquery>
<cfoutput query="activeagency">
<b>#activeagency.agency#, #activeagency.recordcount#</b><br>
</cfoutput>
Occupational & Professional Licensing , 47
Employment & Training , 47
Financial Regulation , 47
Occupational & Professional Licensing , 47
Office of the Secretary , 47
Office of the Secretary , 47
Office of the Secretary , 47
Office of the Secretary , 47
Occupational & Professional Licensing , 47
Occupational & Professional Licensing , 47
Labor & Industry , 47
Office of the Secretary , 47
Occupational & Professional Licensing , 47
Office of the Secretary , 47
Office of the Secretary , 47
Occupational & Professional Licensing , 47
Occupational & Professional Licensing , 47
Office of the Secretary , 47
Office of the Secretary , 47
Office of the Secretary , 47
Financial Regulation , 47
Financial Regulation , 47
Occupational & Professional Licensing , 47
Occupational & Professional Licensing , 47
Occupational & Professional Licensing , 47
Occupational & Professional Licensing , 47
Occupational & Professional Licensing , 47
Office of the Secretary , 47
Office of the Secretary , 47
Employment & Training , 47
Office of the Secretary , 47
Occupational & Professional Licensing , 47
Office of the Secretary , 47
Employment & Training , 47
Occupational & Professional Licensing , 47
Office of the Secretary , 47
Financial Regulation , 47
Financial Regulation , 47
Racing , 47
Office of the Secretary , 47
Occupational & Professional Licensing , 47
Employment & Training , 47
Occupational & Professional Licensing , 47
Occupational & Professional Licensing , 47
Occupational & Professional Licensing , 47
Occupational & Professional Licensing , 47
Financial Regulation , 47
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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