select id, type, pagename
from navigation
group by type, id
having type <> 'o'
order by id

>From: "Daniel Farmer" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: CF-Talk <[EMAIL PROTECTED]>
>Subject: Re: a query
>Date: Sun, 21 Dec 2003 17:46:46 -0500
>
>Tony, here is my code:
>
><CODE>
>   <cfset thesql="select id, type, pagename
>                  from navigation where type <> 'o'
>                  group by type, id
>                  order by id">
>
>
><ERROR>
>
>[Microsoft][ODBC Microsoft Access Driver] You tried to execute a query that
>does not include the specified _expression_ 'pagename' as part of an
>aggregate function.
>
>
>
>   ----- Original Message -----
>   From: Tony Weeg
>   To: CF-Talk
>   Sent: Sunday, December 21, 2003 3:51 PM
>   Subject: RE: a query
>
>
>   select id, type
>   from yourTable
>   group by type, id
>   order by id
>
>   hth
>
>   ....tony
>
>   tony weeg
>   [EMAIL PROTECTED]
>   www.revolutionwebdesign.com
>   rEvOlUtIoN wEb DeSiGn
>   410.334.6331
>
>   -----Original Message-----
>   From: Daniel Farmer [mailto:[EMAIL PROTECTED]
>   Sent: Sunday, December 21, 2003 2:43 PM
>   To: CF-Talk
>   Subject: a query
>
>   This will probably be simple, but I'm no sql master.
>
>   I have three columns
>   ID, TYPE, PAGENAME
>
>   I want to select all items, group by type and order by id.
>
>   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   Daniel Farmer
>   Coldfusion Developer / Producer
>   http://www.bernardclark.com/danfarmer.ca/
>   613.284.1684
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to