Try this... I didn't do the caps thing like you are doing but you should get
the jist!
<cfquery name="qr_states" datasource="CaptekLab">
SELECT s.state, l.lab_name
FROM tblstate s, tbllabs l
WHERE s.pk_tblSTATEID = l.fk_tblSTATEID
GROUP BY s.state, l.lab_name
</cfquery>
<cfoutput query="qr_states" group="CaptekLab.state">
#qr_states.state#<br>
<cfoutput>#qr_states.lab_name#</cfoutput>
</cfoutput>
Good Luck
Paul Giesenhagen
QuillDesign
----- Original Message -----
From: "Joshua Tipton" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 9:10 PM
Subject: Output Help
> Okay I fell stupid asking this because I have accomplished this many
> times I just cant rememeber tonight.
>
>
>
>
>
> <cfquery name="qry_STATES" datasource="CaptekLab">
>
> SELECT PK_tblSTATEID, State
>
> FROM dbo.tblSTATE
>
> </cfquery>
>
> <table>
>
> <cfloop query="qry_states">
>
> <cfquery name="qry_labs" datasource="CaptekLab">
>
> SELECT FK_tblSTATEID, Lab_Name, Lab_City, Lap_Phone
>
> FROM tblLABS
>
> where fk_tblSTATEID = '#qry_states.pk_tblSTATEID#'
>
> </cfquery>
>
>
>
>
>
>
>
>
>
> <cfoutput query="qry_labs">
>
> <tr>
>
> <td>#qry_states.state#</td>
>
> <td>#Lab_name#</td>
>
> </tr>
>
> </cfoutput>
>
> </cfloop>
>
> </table>
>
>
>
>
>
> I want the state name output once and then a list of all the labs for
> that state
>
>
>
> IE
>
>
>
>
>
> Alaska Lab1
>
> Lab2
>
> Lab3
>
>
>
> Alabama Lab1
>
> Lab2
>
> Lab3
>
>
>
>
______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists