Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pivot Table in Coldfusion

Status
Not open for further replies.

June2009

IS-IT--Management
Jun 22, 2009
1
US
I have the following query which dumps exactly the data I want, but I am having a hard time rapping my brain around how to make a pivot type table out of it with Coldfusion 8.

I need a table to output something like this:

teamname1 teamname2 teamname3
pri1 pri2 pri3 pri1 pri2 pri3 pri1 pri2 pri3

depart1 perc perc perc
depart2 perc perc perc
depart3 perc perc perc



<cfquery name="together" dbtype="query">
select sum((otc.ontimecomplete/compl.complete)*100) as perc,
compl.depart as depart, compl.pri as pri, compl.teamnmes as teamnmes
from otc, compl
where otc.teamnmes=compl.teamnmes and
otc.depart=compl.depart and
otc.pri = compl.pri
group by compl.department, compl.pri, compl.teamnmes
order by department
</cfquery>

I know this is a stuff one, thank you for any examples you can provide. Has anyone ever done this before?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top