From: Howell, Scott [mailto:[EMAIL PROTECTED]
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.
I can't seem to even create a table
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
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
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