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?
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?