If ever you need the literal string "#" and it's in a place where ColdFusion will try to evaluate it (which is the case inside cfquery), use two "##".
Adrian http://www.adrianlynch.co.uk/ -----Original Message----- From: Tech Gate Sent: 26 January 2008 16:29 To: CF-Talk Subject: Re: "#" issue & SQL Query I tried: SELECT @Col_with_No_Pound = @Col_with_No_Pound + CASE @Col_with_No_Pound WHEN '' THEN '' ELSE ',' END + COLUMN_NAME, @Col_with_Pound = @Col_with_Pound + CASE @Col_with_Pound WHEN '' THEN '%' ELSE '%,%' END + COLUMN_NAME <cfset demo_Col_with_Pound = replace(#DemoCol.Col_with_Pound#, "%", "#", "ALL")> But, I get another error. ======= Error Message ====== The CFML compiler was processing: an expression beginning with "replace", on line 37, column 30.This message is usually caused by a problem in the expressions structure. a cfset tag beginning on line 37, column 2. 36 : <cfset demo_Col_with_No_Pound = DemoCol.Col_with_No_Pound> 37 : <cfset demo_Col_with_Pound = replace(#DemoCol.Col_with_Pound#, "%", "#", "ALL")> Thx much ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:297526 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4