I've tried to escape it and also to `bakctick` it - neither seems to work.
ex1- backticks:
mysql> select * from temp01 where `Post#` = 9019;
->
---------
It does not compute as finnished and prompts for more, when I finish
manually it says:
-> ;
ERROR 1054: Unknown column 'Post' in 'where clause'
---------
ex2 - escaped:
mysql> select * from temp01 where Post\# = 9019;
ERROR 1054: Unknown column 'Post' in 'where clause'
- I don't know what to do! I'm wondering if it might have something to do
with the characterset? I'm using latin1. The last thing I wanna do is rename
all the columns.
MYSQL Server Info:
mysql> status
--------------
mysql Ver 11.12 Distrib 3.23.33, for pc-linux-gnu (i686)
Connection id: 131
Current database: tkk
Current user: root@localhost
Current pager: = 9019;
Using outfile: ''
Server version: 3.23.33
Protocol version: 10
Connection: Localhost via UNIX socket
Client characterset: latin1
Server characterset: latin1
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 1 day 17 hours 47 sec
Threads: 19 Questions: 2457 Slow queries: 0 Opens: 30 Flush tables: 1
Open tables: 19 Queries per second avg: 0.017
--------------
----- Original Message -----
From: "Sam Smith" <[EMAIL PROTECTED]>
To: "Erling Paulsen" <[EMAIL PROTECTED]>
Sent: Friday, March 16, 2001 3:21 AM
Subject: Re: Columns named with the # character
> On Fri, 16 Mar 2001, Erling Paulsen wrote:
> > They guy that developed the access database used `#' (comment character)
> > characters to name certain columns. i.e. "Person#". How can manually
select
> > such a column in a mysql query (ex. via the mysql client)? - since it
seems
> > whatever i enclose the column name in, the rest of the query is
interpreted
> > as a comment!
>
> try \# -- the \ should remove the specialness of the #
>
> Although the number of \ may have to be increased, depending
> on what it is you are actually doing, and how many times
> your \ and # are going to get interpretted.
>
>
> Regards
> Sam
>
> --
> Disservice: It Takes Months to Find a Customer, But Only Seconds to Lose
One.
> The Good News is We Should Run Out of Them In No Time.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php