mysqldump error (mysql 4.0.14)

2003-09-29 Thread Rusty Wright
I have a user who unfortunately named one of his tables order.  He also
has table names with a dash in them.  mysqldump is unable to dump the
order table and I'm unable to use the ALTER command on it and the tables
with the dashes in their names to rename them.  Is there any way to quote
the table names so it doesn't treat them as sql commands?

/local_a/servers/mysql/bin/mysqldump: Got error: 1064: You have an error in your SQL 
syntax.  Check the manual that corresponds to your MySQL server version for the right 
syntax to use near 'order READ /*!32311 LOCAL */,order_pricing READ /*!32311 LOCAL  
when using LOCK TABLES


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysqldump error (mysql 4.0.14)

2003-09-29 Thread Kelley Lingerfelt
Try putting the name inside of backticks;

From the Manual:
6.1.2 Database, Table, Index, Column, and Alias Names
---
Note that if the identifier is a restricted word or contains special characters you 
must always
quote it with a ` (backtick) when you use it:
mysql SELECT * FROM `select` WHERE `select`.id  100;
See Section 6.1.7 [Reserved words], page 437.

KL

Rusty Wright wrote:

 I have a user who unfortunately named one of his tables order.  He also
 has table names with a dash in them.  mysqldump is unable to dump the
 order table and I'm unable to use the ALTER command on it and the tables
 with the dashes in their names to rename them.  Is there any way to quote
 the table names so it doesn't treat them as sql commands?

 /local_a/servers/mysql/bin/mysqldump: Got error: 1064: You have an error in your SQL 
 syntax.  Check the manual that corresponds to your MySQL server version for the 
 right syntax to use near 'order READ /*!32311 LOCAL */,order_pricing READ /*!32311 
 LOCAL  when using LOCK TABLES

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysqldump error (mysql 4.0.14)

2003-09-29 Thread Victoria Reznichenko
Rusty Wright [EMAIL PROTECTED] wrote:
 I have a user who unfortunately named one of his tables order.  He also
 has table names with a dash in them.  mysqldump is unable to dump the
 order table and I'm unable to use the ALTER command on it and the tables
 with the dashes in their names to rename them.  Is there any way to quote
 the table names so it doesn't treat them as sql commands?
 
 /local_a/servers/mysql/bin/mysqldump: Got error: 1064: You have an error in your SQL 
 syntax.  Check the manual that corresponds to your MySQL server version for the 
 right syntax to use near 'order READ /*!32311 LOCAL */,order_pricing READ /*!32311 
 LOCAL  when using LOCK TABLES

Use -Q option of mysqldump:
http://www.mysql.com/doc/en/mysqldump.html


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: mysqldump error (mysql 4.0.14)

2003-09-29 Thread Director General: NEFACOMP
`TableNamesOr FieldNames`

- Original Message -
From: Kelley Lingerfelt [EMAIL PROTECTED]
To: Rusty Wright [EMAIL PROTECTED]; Mysql List
[EMAIL PROTECTED]
Sent: Monday, September 29, 2003 09:10
Subject: Re: mysqldump error (mysql 4.0.14)


 Try putting the name inside of backticks;

 From the Manual:
 6.1.2 Database, Table, Index, Column, and Alias Names
 ---
 Note that if the identifier is a restricted word or contains special
characters you must always
 quote it with a ` (backtick) when you use it:
 mysql SELECT * FROM `select` WHERE `select`.id  100;
 See Section 6.1.7 [Reserved words], page 437.

 KL

 Rusty Wright wrote:

  I have a user who unfortunately named one of his tables order.  He
also
  has table names with a dash in them.  mysqldump is unable to dump the
  order table and I'm unable to use the ALTER command on it and the
tables
  with the dashes in their names to rename them.  Is there any way to
quote
  the table names so it doesn't treat them as sql commands?
 
  /local_a/servers/mysql/bin/mysqldump: Got error: 1064: You have an error
in your SQL syntax.  Check the manual that corresponds to your MySQL server
version for the right syntax to use near 'order READ /*!32311 LOCAL
*/,order_pricing READ /*!32311 LOCAL  when using LOCK TABLES
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]






-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]