tracker issue : CF-3632762

select a category, or use search below
(searches all categories and all time range)
Title:

Query of query errors if column alias starts with an underscore

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)

Created: 09/16/2013

Components: Database

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final / 286821

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win All

Vote Count: 0

Repro:
<cfset rainbow = queryNew("")>
<cfset queryAddColumn(rainbow, "id", "integer", [1,2,3,4,5,6,7])>
<cfset queryAddColumn(rainbow, "maori", "varchar", ["whero","karaka","kowhai","kakariki","kikorangi","tawatawa","mawhero"])>
<cfset queryAddColumn(rainbow, "english", "varchar", ["red","orange","yellow","green","blue","indigo","violet"])>

<cfquery name="qoq" dbtype="query">
	SELECT id AS _id
	FROM rainbow
</cfquery>

<cfdump var="#qoq#">


Error:

Error Executing Database Query.


Query Of Queries syntax error.

 Encountered ".
 Lexical error at line 2, column 22. Encountered: "_" (95), after : ""
 
The error occurred in D:/websites/www.scribble.local/junk/junk.cfm: line 6
4 : <cfset queryAddColumn(rainbow, "english", "varchar", ["red","orange","yellow","green","blue","indigo","violet"])>
5 : 
6 : <cfquery name="qoq" dbtype="query">
7 : 	SELECT id AS _id
8 : 	FROM rainbow

Confirmed on CF9 & 10.

Fine on Railo. Fine in T/SQL and MySQL dialects of SQL.

-- 
Adam

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3632762

External Customer Info:
External Company:  
External Customer Name: Adam Cameron.
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments: