3 messages in com.mysql.lists.win32SELECT statement problem for Win2K/my...
FromSent OnAttachments
Howell, Scott14 Mar 2002 09:53 
Paul van Helden15 Mar 2002 00:45 
Jose Ostos15 Mar 2002 08:00 
Subject:SELECT statement problem for Win2K/mysql-max-3.23.49
From:Howell, Scott (Howe@plymart.com)
Date:03/14/2002 09:53:16 AM
List:com.mysql.lists.win32

I have exported a table from Access 2000 through the ODBC driver to a database on MySQL 3.23.49. Here is a DESC of the table called v7_emp. +--------------+------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+------------+------+-----+---------+-------+ | emp-num | int(11) | YES | | NULL | | | emp-code | text | YES | | NULL | | | emp-name | text | YES | | NULL | | | emp-addr1 | text | YES | | NULL | | | emp-addr2 | text | YES | | NULL | | | emp-city | text | YES | | NULL | | | emp-state | text | YES | | NULL | | | emp-zip | text | YES | | NULL | |

I can do a SELECT * FROM v7_emp

But if I do a SELECT emp-num from v7_emp; I get this error. ERROR 1054: Unknown column 'emp' in 'field list' I tried this on another table that does not have a '-' dash and it works fine. Does MySQL not allow '-' in table names. The manual says it can use any characters. Is there a work-around?