Answered
Query of Queries Case Sensitive
Ok, so I'm sure everyone already knows that Query of Queries
in ColdFusion 7+ is case-sensitive. Everywhere I go, including CF
Documentation, states to use the LOWER() or UPPER() function in the
QoQ to get around this. I am still receiving an exception when I
try to do this. Here are two examples of what I've, neither of
which works:
<cfquery name="qParameters" dbtype="query">
SELECT ParamIdNmb, LOWER(ParameterName) AS ParameterName_lower
FROM qReportTypeParams
</cfquery>
<cfquery name="qParameter" dbtype="query">
SELECT ParamIdNmb
FROM qReportTypeParams
WHERE LOWER(ParameterName) = '#LCase(some_variable)#';
</cfquery>
However, in the same file, this DOES work:
<cfquery name="qReportColumnParameter" dbtype="query">
SELECT ParamIdNmb
FROM qReportTypeParams
WHERE UPPER(ParamName) = UPPER('param1')
</cfquery>
Does anyone have any thoughts? Does it have anything to do with these queries being in a CFC?
Please help.
Thank you.
<cfquery name="qParameters" dbtype="query">
SELECT ParamIdNmb, LOWER(ParameterName) AS ParameterName_lower
FROM qReportTypeParams
</cfquery>
<cfquery name="qParameter" dbtype="query">
SELECT ParamIdNmb
FROM qReportTypeParams
WHERE LOWER(ParameterName) = '#LCase(some_variable)#';
</cfquery>
However, in the same file, this DOES work:
<cfquery name="qReportColumnParameter" dbtype="query">
SELECT ParamIdNmb
FROM qReportTypeParams
WHERE UPPER(ParamName) = UPPER('param1')
</cfquery>
Does anyone have any thoughts? Does it have anything to do with these queries being in a CFC?
Please help.
Thank you.
