Mark-
I haven't worked with Access in a while, but IIRC ... (can someone verify
this?)
You can escape a table name or field name with non-alphanumeirc characters
by surrounding it with brackets []. Seeing as how this particular character
is a hash, you'll probably also have to escape it, too. Like so:
SELECT cn.[Cust##] AS CustNum
FROM [Customer Numbers] cn
(I'm using the table alias to show you that each part of the table name has
to be in its own brackets ([dbname]..[tablename].[fieldname]), just in case
you were wondering.)
This also works well with Excel spreadsheets when used as datasources.
(Those things almost *never* have SQL-compliant field and table names.)
-Rick
P.S. - I think this is the thing which drives me the most crazy when working
with customers. :)
-----Original Message-----
From: Mark Armendariz [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 31, 2000 3:00 PM
To: Cf-Talk
Subject: Escaping Pound Signs in a CF Query....
For some strange and utterly inconvenient reason, our former Access Database
guy had created a form field named Cust#. I imagine this stands for
CustNumber, but CF doesn't seem to agree. Is there a way to escape a #
(pound sign) so i can query the table?
I've tried doing a "Cust# As CustNum" as well as Cust##. Nothing seems to
work.
Anyone know of anything?
Thanks In Advance!!
Mark Armendariz
Righteous Design
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.