Surprisingly this doesn't work with DBTYPE="query". And I'm even running 
CFMX7!

On 8/25/05, Mike Klostermeyer <[EMAIL PROTECTED]> wrote:
> 
> SELECT * FROM thetable ORDER BY [my column]
> 
> Mike
> 
> -----Original Message-----
> From: Ewok [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 25, 2005 1:01 PM
> To: CF-Talk
> Subject: RE: QoQ Trouble for Column Names with Spaces
> 
> 
> Give it an alias in your original query that doesn't have spaces.
> 
> <cfquery datasource="...
> Select "my column" as mycolumn
> 
> -----Original Message-----
> From: Brendan Baldwin [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 25, 2005 11:15 AM
> To: CF-Talk
> Subject: QoQ Trouble for Column Names with Spaces
> 
> Hi everyone --
> 
> I'm working for a client who has given me some Oracle stored procedures
> which return some fields that have SPACES in the columns returned.
> 
> I want to apply sorting to the results, so I was going to use a CFQUERY
> DBTYPE="query" and just ORDER BY selectively--
> 
> The problem is that I can't seem to reference column names that have 
> spaces
> in them when doing a QoQ !
> 
> Anyone know how to reference column names with spaces in a QoQ?
> 
> I've tried:
> SELECT * FROM thetable ORDER BY 'my column'
> SELECT * FROM thetable ORDER BY "my column"
> SELECT * FROM thetable ORDER BY [my column]
> SELECT * FROM thetable ORDER BY ['my column']
> 
> Any other Ideas?
> 
> --Brendan
> 
> 
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216412
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to