My query works with no problems, but when coldfusion process it I get the following error:
Just in time compilation error
Invalid token found on line 41 at position 1. ColdFusion was looking at the following text:
</cfq
Invalid expression element. The usual cause of this error is a misspelling in the expression text.
Here's the code from my .cfm:
<cfquery name="daily" datasource="database" username="user" password="password">
SELECT
CASE
WHEN (COLUMNA = 'A' AND COLUMNB = 'A') THEN 'Result 1'
WHEN (COLUMNA = 'B' AND COLUMNB = 'B') THEN 'Result 2'
WHEN (COLUMNA = 'C' AND COLUMNB = 'C') THEN 'Result 3'
WHEN (COLUMNA = 'D' AND COLUMNB = 'C') THEN 'Result 4'
WHEN (COLUMNA = 'E' AND COLUMNB = 'E') THEN 'Result 5'
END (NAMED ENTITY),
BASE_SNAPSHOT_DT
FROM TABLE;
</cfquery>
As you can see, the cfquery is closed. I'm wondering if I'm missing something obvious or perhaps I hit a bug? I can take this SQL out and replace it another simple select statement, leaving all of the cfquery parameters the same and it works properly. Any help would be appreciated. Thanks.
V
Just in time compilation error
Invalid token found on line 41 at position 1. ColdFusion was looking at the following text:
</cfq
Invalid expression element. The usual cause of this error is a misspelling in the expression text.
Here's the code from my .cfm:
<cfquery name="daily" datasource="database" username="user" password="password">
SELECT
CASE
WHEN (COLUMNA = 'A' AND COLUMNB = 'A') THEN 'Result 1'
WHEN (COLUMNA = 'B' AND COLUMNB = 'B') THEN 'Result 2'
WHEN (COLUMNA = 'C' AND COLUMNB = 'C') THEN 'Result 3'
WHEN (COLUMNA = 'D' AND COLUMNB = 'C') THEN 'Result 4'
WHEN (COLUMNA = 'E' AND COLUMNB = 'E') THEN 'Result 5'
END (NAMED ENTITY),
BASE_SNAPSHOT_DT
FROM TABLE;
</cfquery>
As you can see, the cfquery is closed. I'm wondering if I'm missing something obvious or perhaps I hit a bug? I can take this SQL out and replace it another simple select statement, leaving all of the cfquery parameters the same and it works properly. Any help would be appreciated. Thanks.
V