Re: RENAME TABLE with CONCAT string fails

2005-05-28 Thread Paul DuBois
At 17:50 +0200 5/28/05, [EMAIL PROTECTED] wrote: Hi, As Paul said, since concat gives a string, you can use this fact in preparing statement (v4.1). This works fine for me : Ah, yes. This'll work. I forgot about prepared statements. :-) But use replace to change '-' to '_' in the table_na

Re: RENAME TABLE with CONCAT string fails

2005-05-28 Thread mfatene
Hi, As Paul said, since concat gives a string, you can use this fact in preparing statement (v4.1). This works fine for me : But use replace to change '-' to '_' in the table_name. set @tt:=concat('rename table flows_2005_05_27 to ',CONCAT("flows_", replace(DATE_SUB(CURDATE(), interval 2 day),'-

Re: RENAME TABLE with CONCAT string fails

2005-05-28 Thread Paul DuBois
At 11:00 -0400 5/28/05, Jason Dixon wrote: On May 28, 2005, at 8:51 AM, Paul DuBois wrote: At 8:12 -0400 5/28/05, Jason Dixon wrote: I'm trying to rename some tables for archival, but the table renaming is failing when I use CONCAT() to form the table string name: CONCAT() produces a string

Re: RENAME TABLE with CONCAT string fails

2005-05-28 Thread Jason Dixon
On May 28, 2005, at 8:51 AM, Paul DuBois wrote: At 8:12 -0400 5/28/05, Jason Dixon wrote: I'm trying to rename some tables for archival, but the table renaming is failing when I use CONCAT() to form the table string name: CONCAT() produces a string, not an identifier. Fine. Is there any wa

Re: RENAME TABLE with CONCAT string fails

2005-05-28 Thread Paul DuBois
At 8:12 -0400 5/28/05, Jason Dixon wrote: I'm trying to rename some tables for archival, but the table renaming is failing when I use CONCAT() to form the table string name: CONCAT() produces a string, not an identifier. mysql> RENAME TABLE flows TO flows_tmp, flows_new TO flows, flows_tmp

Re: Rename table?

2003-04-01 Thread ag315
If you use PHP program like below... It's simple OK ? if you use other programming language, It's similar to above example. Sorry, My english is so poor -_-;; > Is it possible to rename a MySQL table? If so, how? > If not, is there a simple query syntax to copy a table? > I don't have access

Re: Rename Table in Replication failed / command missing in slave log

2002-08-13 Thread Heikki Tuuri
> Lutz, > > - Original Message - > From: "Lutz Maibach" <[EMAIL PROTECTED]> > To: "Heikki Tuuri" <[EMAIL PROTECTED]> > Sent: Tuesday, August 13, 2002 5:09 PM > Subject: Re: Rename Table in Replication failed / command missing in slave &

Re: Rename Table in Replication failed / command missing in slave log

2002-08-13 Thread Heikki Tuuri
Hi! The following might fix Pete's RENAME TABLE bug: ... August 12, 2002: If you ran in the AUTOCOMMIT mode, executed a SELECT, and immediately after that a RENAME TABLE, then RENAME would fail and MySQL would complain about error 1192 'Can't execute the given command because you have active lock

Re: Rename Table in Replication failed / command missing in slave log

2002-08-12 Thread Pete Harlan
If you're using InnoDB tables, replication stops the slaves from running. Heikki said he'd try to get this fixed for 3.23.52. --Pete On Mon, Aug 12, 2002 at 04:05:11PM +0200, Lutz Maibach wrote: > Hi, > > today I noticed a strange behaviour in MySQL 3.23.49a-Replication I can't explain. > A

RE: rename table

2001-06-27 Thread David Lidström ( Cabesa )
Try this; ALTER TABLE old_table_name RENAME TO new_table_foobar \david -Original Message- From: Michael Ott [mailto:[EMAIL PROTECTED]] Sent: den 27 juni 2001 09:19 To: MySQL-Mailing-List Subject: rename table hallo i want to change the name of a table. what must i do? -- G

Re: rename table

2001-06-27 Thread Dan Nelson
In the last episode (Jun 27), Michael Ott said: > hallo > > i want to change the name of a table. what must i do? http://www.mysql.com/doc, enter "rename table", hit "search": http://www.mysql.com/doc/R/E/RENAME_TABLE.html > Before posting, please check: >http://www.mysql.com/manual.php