List:General Discussion« Previous MessageNext Message »
From:David Adam Date:May 31 2002 11:22pm
Subject:Column names that contain %
View as plain text  
I have a table that includes numerous column names of the form
'%_Dry_Weight' -- that is, they start with a
percent sign.  I am unable to query these columns, as mysql returns a
"you have an error in your SQL syntax'
message.  When I try to escape the % character with a backslash, the
error persists.  If I put the column name in single quotes (e.g., select
'%_Dry_Weight' from xxx) , the syntax is accepted, but the query returns
the column name, rather than the values stored.  According to the manual
for 3.23.41 (which I am using),  all characters are acceptable in column
names.  I am at an impasse - can anyone steer me in the proper
direction?  Many thanks!

--
David Adam
Quaternary Geologist
Lake County, California



Thread
Column names that contain %David Adam1 Jun
  • Re: Column names that contain %Dan Nelson1 Jun