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
On Jan 26, 2008 11:07 AM, Tech Gate <[EMAIL PROTECTED]> wrote:
>
> I have a sql query (SQL Server 2000) for CFMX:
>
> 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
> ....
>
> Obviously, # is causing the error whereas I need to # sign there.
>
> ======= Error Message ======
>
> The CFML compiler was processing:
>
> An expression that began on line 27, column 99.
> Your expression might be missing an ending "#" (it might look like #expr ).
> The body of a cfquery tag beginning on line 20, column 2.
>
> 27 : @Col_with_Pound = @Col_with_Pound + CASE
> @Col_with_Pound WHEN '' THEN '#' ELSE '#,#' END + COLUMN_NAME
>
>
> How do you get around this error? I need to use a single # in the
> query for the output.
>
> 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:297523
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4