Which version of MySQL are you using? It works for me with version 4.0.15 as shown below: mysql> select version(); +-----------+ | version() | +-----------+ | 4.0.15 | +-----------+ 1 row in set (0.00 sec)
mysql> create table temp (`FILE#` integer); Query OK, 0 rows affected (0.00 sec) mysql> select * from temp where `FILE#`=1332; Empty set (0.00 sec) Bernard On Thursday 29 January 2004 13:44, Howell, Scott wrote: > select * from emp where `file#` = 1332; > returns > ERROR 1054: Unknown column 'file' in 'where clause' > > > > -----Original Message----- > From: Bernard Clement [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 29, 2004 1:19 PM > To: Howell, Scott; Mysql (E-mail) > Subject: Re: HELP! Select queries for tables that has fields with # > characters > > > Hello Howell, > > See URL: http://www.mysql.com/doc/en/Legal_names.html for the solution. > > Basically enclose FILE# with `, e.g. where `FILE#` = 1332 > > Bernard > > On Thursday 29 January 2004 12:55, Howell, Scott wrote: > > I am trying to query a table that has field names with # characters in > > them. For example a table emp_earn has a field called FILE# > > > > I need to do a query where FILE# = 1332, but anything I try errors out. -- Bernard Clement Info-Electronics Systems Inc. Technical Director phone: 514-421-0767 ext: 231 fax: 514-421-0769 email: [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]