Michael, I have actually had problems where the data type caused a problem. I was building a query based on "score", all of which were of type "Integer"... When dumping the query, all values were numeric... However when sorting on the column, it would throw errors about trying to sort on non-numeric types. If I stopped sending in the Data types to QueryNew(), worked perfect.
This is the line that was causing the error. If this line didn't get called, the sort worked fine: <cfset REQUEST.SearchQuery[ "score" ][ REQUEST.SearchQuery.CurrentRow ] = Min( ( REQUEST.SearchQuery[ "score" ][ REQUEST.SearchQuery.CurrentRow ] + Ceiling(100 / ArrayLen(arrCriteria)) ), 80 ) /> This line only gets called if there is an ArrayLen()... Score always defaults to zero... I can't see anyway for this to return anything but a numeric value. Yet, if I comment it out, the sort would work fine. There was not code afterwards that would be affected by it (no conditional logic affected by my commenting out the line). And like I said, if I look out the data type passing, works great. Seems like a bug to me. ....................... Ben Nadel Web Developer Nylon Technology 350 7th Avenue Floor 10 New York, NY 10001 212.691.1134 212.691.3477 fax www.nylontechnology.com "You know, like nunchuck skills, bowhunting skills, computer hacking skills... Girls only want boyfriends who have great skills." - Napoleon Dynamite -----Original Message----- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Friday, May 12, 2006 9:42 AM To: CF-Talk Subject: Re: Query of Queries When creating a query using QueryNew() you can add an optional second attribute to it which will define each column as a specific data type. This will avoid the error: QueryNew(columnlist, [columntypelist]) Michael Dinowitz Host: House of Fusion http://www.houseoffusion.com Publisher: Fusion Authority http://www.fusionauthority.com >I have never seen this specifically, but I have gotten similar errors >when I try to define a query with QueryNew() sending in data types... >Are you using > QueryNew() to define any query that you are queryying? > > ....................... > Ben Nadel > Web Developer > Nylon Technology > 350 7th Avenue > Floor 10 > New York, NY 10001 > 212.691.1134 > 212.691.3477 fax > www.nylontechnology.com > > "You know, like nunchuck skills, bowhunting skills, computer hacking > skills... Girls only want boyfriends who have great skills." > - Napoleon Dynamite > -----Original Message----- > From: Rick Root [mailto:[EMAIL PROTECTED] > Sent: Friday, May 12, 2006 9:31 AM > To: CF-Talk > Subject: Query of Queries > > I'm getting the following error: > > Query Of Queries runtime error.</b><br> Cannot apply the binary > numeric operator [*|/] on a non numeric type > > When running the following query of queries: > > select > sum(QUANTITY) AS QUANTITY, > SUM(QUANTITY*OPTION_PRICE) AS MERCH_CHARGE FROM contents > > I dumped the contents of the "contents" query and both "QUANTITY" and > "OPTION_PRICE" contain numeric values. > > I've never seen this error before and this code hasn't changed from a > previous installation of the same code on a different server. > > This server is at smarterlinux, it's coldfusion mx 7 7,0,1,116466 > > Rick > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:240320 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