Why don't you use column aliases in the query:

SELECT 'First Name' AS FirstName, 'Last-Name'AS LastName, PhoneExtension
FROM Employees
ORDER BY 'Last-Name', 'First Name'

(example from Ben Forta's CF Web Application Construction Kit book)

Eric

-----Original Message-----
From: Williams, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 24, 2001 2:56 PM
To: CF-Talk
Subject: Spaces in query column names


I have a table that is out of my control and some of the column names have
spaces or dashes in them and one is a number.

Querying the table works fine, but when I go to output the results of the
query CF chokes on these various column names.  I've tried different
formatting functions to present a proper variable name to CF, but so far
have not had any luck.  Does somebody know how to format improper column
names to that CF will output them?

I appreciate any help!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to