Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Bradley Wood / Bradley Wood (Bradley Wood)
Created: 10/15/2013
Components: Database
Versions: 10.0
Failure Type:
Found In Build/Fixed In Build: Final / 288354
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Windows 7 SP1 64-bit
Vote Count: 0
Problem Description: Query of Query column alias ignored when column name is preceded by the name of the query
Steps to Reproduce:
<cfset qryName = queryNew("col")>
<cfquery name="qryResult" dbtype="query">
SELECT qryName.col as aliasName
FROM qryName
</cfquery>
<cfoutput>#qryResult.aliasName#</cfoutput>
Actual Result:
Error Occurred While Processing Request
Element ALIASNAME is undefined in QRYRESULT.
Expected Result:
No error. Output empty string.
Any Workarounds:
Omitting the result set name like so will work.
<cfset qryName = queryNew("col")>
<cfquery name="qryResult" dbtype="query">
SELECT col as aliasName
FROM qryName
</cfquery>
<cfoutput>#qryResult.aliasName#</cfoutput>
However, that is not an option when joining to result sets with the same column name. This worked in CF9 and is a regression in CF10.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3649985
External Customer Info:
External Company:
External Customer Name: bradwood.com
External Customer Email:
External Test Config: My Hardware and Environment details:
Server Product ColdFusion
Version 10,0,11,285437
Tomcat Version 7.0.23.0
Edition Developer
Serial Number Developer
Operating System Windows 7
OS Version 6.1
Attachments:
Comments: