Yes, I know about the group attribute of cfoutput. But I need the output in a specific order and I thought if I could group in SQL, I could write some CF code to display it the way I needed it.
Thank you for your response and suggestion. > -----Original Message----- > From: Mary Jackson [SMTP:[EMAIL PROTECTED]] > Sent: Thursday, December 06, 2001 5:02 PM > To: SQL > Subject: RE: GROUP BY clauses > > Group by is used only with aggregate functions. Example > count(ConfererenceID) or Sum(Price) or AVG(Price). > > If you want these to display in a sponsortype group. Then use the group > by > capacity of Coldfusion. > > <UL> > <cfoutput query="employees" group="department"> > <LI>#Dempartment# > <UL> > <cfoutput> > <LI>#Name#, #Phone# > </cfoutput> > </UL> > </cfoutput> > </UL> > > > At 04:54 PM 12/6/01 -0500, you wrote: > > SELECT ConferenceID, Sponsor, SponsorType, ImgName, URL_Link > > FROM Conf_Sponsors > > WHERE ConferenceID = '#url.id#' > > GROUP BY SponsorType > > > > > -----Original Message----- > > > From: Mary Jackson [SMTP:[EMAIL PROTECTED]] > > > Sent: Thursday, December 06, 2001 4:40 PM > > > To: SQL > > > Subject: RE: GROUP BY clauses > > > > > > Include your query > > > > > > > > > At 04:37 PM 12/6/01 -0500, you wrote: > > > >I did. I tried that before I sent my post. > > > >Same error message. > > > > > > > > > > > > > -----Original Message----- > > > > > From: Dean H. Saxe [SMTP:[EMAIL PROTECTED]] > > > > > Sent: Thursday, December 06, 2001 4:29 PM > > > > > To: SQL > > > > > Subject: Re: GROUP BY clauses > > > > > > > > > > Using GROUP BY you must include all columns returned by the query > > > which > > > > > are > > > > > not aggregates (e.g. SUM, COUNT, MIN). > > > > > > > > > > e.g. > > > > > > > > > > SELECT > > > > > foo, > > > > > bar, > > > > > blah, > > > > > count(foobar) as count_foobar > > > > > FROM > > > > > table > > > > > GROUP BY > > > > > foo, bar, blah; > > > > > > > > > > If you remove any of the columns from the GROUP BY clause you will > > > receive > > > > > > > > > > the error you mentioned in your post. > > > > > > > > > > HTH, > > > > > > > > > > -dhs > > > > > > > > > > At 04:17 PM 12/6/01 -0500, you wrote: > > > > > >I'm using SQL Server 2000. > > > > > >I wrote query using the GROUP BY clause, but an error gets thrown > > > saying > > > > > the > > > > > >columns are > > > > > >"invalid in the select list because it is not contained in either > an > > > > > >aggregate function or the GROUP BY clause" > > > > > > > > > > > >I did some digging and found something called the "GROUP BY > Support > > > > > >Property" > > > > > >I'm not sure, but it looks like I can change the behavior of the > > > GROUP BY > > > > > >clause. > > > > > >Does anyone know if this is true, and how do I do it? > > > > > >Else, why is the GROUP By clause throwing me the error? > > > > > >Matt > > > > > > > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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 Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
