Les, the datatyping may occur in your first query, especially if you are building on to a query that initially retrieves records from the database. If you are specifically creating a query and have a combination of numeric/alpha being returned, you should attempt to type the query columns yourself when declaring the Query via a QueryNew().
To check how CF interprets the datatypes do this: <cfset myQueryMeta = getMetaData(q_atty)> <cfdump var="#myQueryMeta #"> I am not sure why you would put both an integer and UUID in the same column especially since you are attempting to perform a sort later on the same colums. This would throw off the sort wouldn't it. Maybe you might want to determine a constant integer value for any UUID so that you can consistently sort by the secondary sort option (name). You could check input for correct type with something like IsNumeric(), then insert a constant for UUID and the returned number otherwise. Cheers, -Bilal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:307981 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4