I think your problem may stem from the old behavior of ColdFusion query columns guessing what type they are based on values in the first several rows.
If the first few records lead CF to believe that a column is an integer, things can blow up later when it encounters letters in that column. If the data in the column differs based on the search criteria that can lead to "occasional" errors. Please show us the code that creates the q_atty variable. If you are using querynew() and you are on CF7 or later, use the second attribute which is a comma-separated list of data types. ~Brad -----Original Message----- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: Monday, June 23, 2008 1:44 PM To: CF-Talk Subject: Re: Odd results with error - ideas? > I am not sure why you would put both an integer and UUID in the > same column The former owner of the database had an id (integer - auto increment) column, and an atty_id column that had integers in it, but was type varCHAR. No idea why he did that. In reprogramming the site, I had no choice but to keep the data structure, but the varCHAR field was already set large enough to hold a UUID - so I switched to UUID's at that point. This shouldn't make any difference that I can see. > <cfset myQueryMeta = getMetaData(q_atty)> > <cfdump var="#myQueryMeta #"> It's coming out of the original query from the database as varCHAR, as it should be. So, it should be going into the query object as varCHAR too, correct? > especially since you are attempting to perform a sort later on the same colums. I'm not doing a sort on the atty_id column. Just the calculated keyCOUNT value (total number of times the search term appears in a particular field), then first_name, last_name. What I don't understand at all, is that some searches that return a small amount of results work fine. A larger returned set of results, that could contain the SAME results from the smaller search, will error on the atty_id field or a record it didn't error on in the previous search. If it *always* errored on the atty_id field when it was a UUID, I'd have a better understanding of what was going on. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307987 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4