Hi andrew, Here's my query to get the distinct buildings: <cfquery name="distinctBuildings" dbtype="query"> select distinct(building) from empResult order by building desc </cfquery>
I have the whole page surrounded by a <CFOUTPUT> so i have to use a CFLOOP to ouput the queries. "<cfif distinctBuilding.building neq "">" <-- i'll change accordingly. old habit..don't know how i got it. thanx. >I am assuming that the undefined building means not seated? > >Now here is the trick your missing > >Make sure you're query is sorted by building and then what ever something >like > >order by Building,fName in your query. > >Then insteado of using cfloop, use cfoutput like this > ><cfoutput query="queryName" group="building"> > <cfif queryName.Building neq ""> > Building: #queryName.Building# > <cfoutput> > #fName# #lName# > </cfoutput> > <br> > </cfif> ></cfoutput> > >Now I am not sure how the undefined string will be sorted with this, but you >could run this twice one with is numeric around the output and one if its >null... > >And why do people insist on learning CF with this? > <cfif #distinctBuilding.building# NEQ ""> > >instead of > <cfif distinctBuilding.building neq ""> > >Who is teaching you that? > > > >On 5/23/07, Christopher Chin <[EMAIL PROTECTED]> wrote: >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Upgrade to Adobe ColdFusion MX7 The most significant release in over 10 years. Upgrade & see new features. http://www.adobe.com/products/coldfusion?sdid=RVJR Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278921 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4