Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Hash Marks in Field Names

New Here ,
Aug 13, 2008 Aug 13, 2008
Forgive me but I have forgotten how to do this.
I'm trying to pass the query field name: "Pat #" , which can't be changed.
<cfset pat_no = '#Pat ##'>
Problem is the hash mark in the field name.
I've tried:
<cfset pat_no = '#Pat #'#''>
but it errors out.
342
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Aug 13, 2008 Aug 13, 2008
aliceinthemirror wrote:
> I've tried:
> <cfset pat_no = '#Pat #'#''>
> but it errors out.
>

You escape ColdFusion control characters by doubling them. So your line
should probably be <cfset pat_no = '#Pat ###'>

HTH
Ian
Translate
LEGEND ,
Aug 13, 2008 Aug 13, 2008
aliceinthemirror wrote:
> I've tried:
> <cfset pat_no = '#Pat #'#''>
> but it errors out.
>

You escape ColdFusion control characters by doubling them. So your line
should probably be <cfset pat_no = '#Pat ###'>

HTH
Ian
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 13, 2008 Aug 13, 2008
LATEST
Thanks for the help.
It worked fine.
Hope I can help you out one day.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 13, 2008 Aug 13, 2008
<cfset pat_no = 'Pat ##'> or try <cfset pat_no = '#Pat ###'> if its an actual column name - I havnt tested that one though.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources