Torrent Girl, please correct me if I'm wrong, but this is my 
understanding of your scenario:

You have a stored proc that results in a query with a column called 
[LAST NAME], which is a column with a space in it.  You cannot change 
this stored proc.

Now when you do a QoQ on this query, and you do a SELECT [LAST NAME] AS 
LASTNAME in the QoQ, CF errors out.

Solution:  In the QoQ, you wrap the column with single-quotes.  This works:

<cfquery name="storedProcData" datasource="stuff1">
     SELECT 'this is data in the column' AS [COLUMN WITH SPACES IN THE NAME]
</cfquery>

<cfquery name="queryOfQueries" dbtype="query">
     SELECT 'COLUMN WITH SPACES IN THE NAME' AS COLUMNNAME FROM 
storedProcData
</cfquery>

<cfdump var="#storedProcData#">
<cfdump var="#queryOfQueries#">

- Rex

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5716
Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm

Reply via email to