What information are you trying to get then?
On 6/13/06, Rick Faircloth <[EMAIL PROTECTED]> wrote: > But why does it require that the count be calculated > if I don't need that information? > > > > > -----Original Message----- > From: Greg Morphis [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 13, 2006 1:05 PM > To: CF-Talk > Subject: Re: Group By function for MS SQL Server Express 2005? > > But it is needed, that query is returning the count of the books per > book_genre > > On 6/13/06, Rick Faircloth <[EMAIL PROTECTED]> wrote: > > I finally did get Express to give me the results I wanted... > > > > Here's the solution the Query Builder gave: > > > > Select Count(*) as Expr2, Book_Genre > > from Books > > Group By Book_Genre > > Order By Book_Genre > > > > Seems strange to require an unneeded aggregate function... > > > > Rick > > > > > > > > > > -----Original Message----- > > From: Rick Faircloth [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, June 13, 2006 12:43 PM > > To: CF-Talk > > Subject: RE: Group By function for MS SQL Server Express 2005? > > > > Ok...I had read a message that mentioned the aggregate function > > requirement...but how would I write my example query to include an > > (unneeded?) aggregate function? > > > > (And why would there be an aggregate requirement anyway?) > > > > > > Query (MySQL version): > > > > Select * from books group by genre > > > > > > > > -----Original Message----- > > From: Alan Rother [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, June 13, 2006 12:31 PM > > To: CF-Talk > > Subject: Re: Group By function for MS SQL Server Express 2005? > > > > Here is a simple example using the Northwind database in SQL Server > > > > > > The key to the GROUP BY clause is that is needs to be used in > > aggregate functions > > > > > > SELECT COUNT(P.ProductID) AS ItemTotal, C.CategoryName FROM Products > > AS P INNER JOIN Categories AS C ON P.CategoryID = C.CategoryID GROUP > > BY P.CategoryID, C.CategoryName > > > > > > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:243373 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54