Nope, no comma ... but I did figure it out - was missing a declaration for a column in the QueryNew() line.
Joshua Miller Web Development::Programming Eagle Technologies Group, Inc. www.eagletgi.com [EMAIL PROTECTED] -----Original Message----- From: Dave Hannum [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 18, 2001 8:15 AM To: CF-Talk Subject: Re: Sorting a Query of a Query You need a comma between #orderby# and #updn# for one thing. Dave ----- Original Message ----- From: "Joshua Miller" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, October 17, 2001 9:47 AM Subject: Sorting a Query of a Query > When attempting to ORDER BY on a Query of a Query, I get the following error > on ALL fields: > > Query Manipulation Error Code = 0 > STOREID is not a column that can be sorted on. > > The query that I'm querying is a "Built Query" using QueryNew(), > QueryAddRow() and QuerySetCell() to create the final query. > > Is this possible or am I doing something wrong? > > Code: > > <cfparam name="startdate" > default="#dateformat(dateadd('yyyy','-1',Now()),'mm/dd/yyyy')#"> > <cfparam name="enddate" default="#dateformat(Now(),'mm/dd/yyyy')#"> > <cfparam name="orderby" default="storeid"> > <cfparam name="updn" default="ASC"> > > <cfquery dbtype="query" name="qNew"> > SELECT * FROM qGetOrders > WHERE dateordered BETWEEN '#startdate#' AND '#enddate#' > ORDER BY #orderby# #updn# > </cfquery> > > > Joshua Miller > Web Development::Programming > Eagle Technologies Group, Inc. > www.eagletgi.com > [EMAIL PROTECTED] > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

