QoQ (Query of queries) struggles with data types as ColdFusion is 'typeless' while the QoQ engine needs to know types. It tries to figure out the types of columns and often gets it wrong :(
Another thing, building a query string isn't required with ColdFusion in the way you are doing it, have you come from another language? Instead of: <cfset sqlQuery = "select distinct " & uniqueColumnString & " from massImport"> <cfquery name="getUniqueColumns" dbtype="query"> <cfoutput>#sqlQuery#</cfoutput> </cfquery> You can (and probably should for readability) do: <cfquery name="getUniqueColumns" dbtype="query"> select distinct #uniqueColumnString# from massImport </cfquery> Cfquery is in essence a cfoutput block that turns the output into a query string before sending it to the server (doing other magic too I'm sure). HTH Dominic On 29/02/2008, Richard White <[EMAIL PROTECTED]> wrote: > > i have seen the documentation on the query on a query and it says that > distinct can be used and i have it exactly as in the example so i really > dont know why that error is showing! > > anyone seen this error before? > > thanks > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:300156 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4