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
> > > >
> > >
> >
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to