You just need to alter your order by: order by itemid, date asc The asc on the date won't affect the itemid order at all.
----- Original Message ----- From: "DRE" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, November 04, 2004 2:56 PM Subject: Re: output listing problem > Nobody has any thoughts? > > > On Thu, 4 Nov 2004 08:14:30 -0800, DRE <[EMAIL PROTECTED]> wrote: >> Hi, >> I have a tricky little issue. Maybe someone can help me. >> >> I have a query that returns a grouped output. There are items that >> have mutiple dates and those dates have to be in order. >> >> Kinda like this. >> >> item z datea dateb datec >> item r datee datef dateg >> >> so my query is like >> select item, date >> where itemid = date_itemid >> order by itemid, date >> >> And the output looks like this >> <cfoutput query="me" group="item"> >> #item# >> <cfoutput> >> #date# >> </cfoutput> >> </cfoutput> >> >> So, in order to keep the dates outputing right, I have to order them >> after the item in the sql order by. >> >> Now my problem is this: I have to have the item with the earliest date >> first. However, to keep the cfoutput group working, I have to have >> the date by as secondary to the item. >> >> I'm thinking I can do it by dumping it into an array of structures and >> then sorting the array of structures or something like that or perhaps >> writing a sp. This page will be hit a lot so I'm trying to keep it >> simple and fast. >> >> cfmx and sql2000. >> >> Any ideas??? >> >> Thanks in advance. >> DRE >> >> -- >> DRE >> www.webmachineinc.com >> www.theanticool.com >> > > > -- > DRE > www.webmachineinc.com > www.theanticool.com > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183477 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

