Re: copy data only from one table to another table

2004-11-18 Thread Jim McAtee
- Original Message - From: <[EMAIL PROTECTED]> To: "Jim McAtee" <[EMAIL PROTECTED]> Cc: "MySQL List" <[EMAIL PROTECTED]> Sent: Thursday, November 18, 2004 8:28 AM Subject: Re: copy data only from one table to another table A semi-generic soluti

Re: copy data only from one table to another table

2004-11-18 Thread SGreen
EMAIL PROTECTED]> wrote on 11/17/2004 08:37:37 PM: > > - Original Message - > From: "Daniel Kasak" <[EMAIL PROTECTED]> > To: "Chip Wiegand" <[EMAIL PROTECTED]>; "MySQL List" > <[EMAIL PROTECTED]> > Sent: Wednes

RE: copy data only from one table to another table

2004-11-18 Thread Jay Blanchard
[snip] [snip] INSERT INTO `table2` (`columnnames`) SELECT `columnnames` FROM `table1` If this is valid SQL surely grave accents are not? [/snip] Actually? MySQL supports the use of grave accents around table and column names. I use them here for emphasis. In certain cases, with older versions of

Re: copy data only from one table to another table

2004-11-18 Thread Jonathan Mangin
- Original Message - From: "Jay Blanchard" <[EMAIL PROTECTED]> To: "Jonathan Mangin" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, November 18, 2004 9:19 AM Subject: RE: copy data only from one table to another table [snip] INSER

RE: copy data only from one table to another table

2004-11-18 Thread Jay Blanchard
[snip] INSERT INTO `table2` (`columnnames`) SELECT `columnnames` FROM `table1` If this is valid SQL surely grave accents are not? [/snip] Actually? MySQL supports the use of grave accents around table and column names. I use them here for emphasis. In certain cases, with older versions of MySQL,

Re: copy data only from one table to another table

2004-11-18 Thread Jonathan Mangin
- Original Message - From: "Jay Blanchard" <[EMAIL PROTECTED]> To: "Chip Wiegand" <[EMAIL PROTECTED]>; "MySQL List" <[EMAIL PROTECTED]> Sent: Thursday, November 18, 2004 8:10 AM Subject: RE: copy data only from one table to another table [

RE: copy data only from one table to another table

2004-11-18 Thread Jay Blanchard
[snip] How do I copy all data only from one table into another table? Both tables are in the same database. I have phpMyAdmin and it suppossedly does this, but it is not working, and there are no error messages. [/snip] INSERT INTO `table2` (`columnnames`) SELECT `columnnames` FROM `table1` --

Re: copy data only from one table to another table

2004-11-18 Thread Frederic Wenzel
On Wed, 17 Nov 2004 18:37:37 -0700, Jim McAtee <[EMAIL PROTECTED]> wrote: > How would this be done if table_2 already exists? It has an > auto_increment field as PK and I want to take all the rows from table_1 > and dump them into table_2. The records being copied from table_1 can get > new prima

Re: copy data only from one table to another table

2004-11-17 Thread Jim McAtee
- Original Message - From: "Daniel Kasak" <[EMAIL PROTECTED]> To: "Chip Wiegand" <[EMAIL PROTECTED]>; "MySQL List" <[EMAIL PROTECTED]> Sent: Wednesday, November 17, 2004 5:04 PM Subject: Re: copy data only from one table to another table

Re: copy data only from one table to another table

2004-11-17 Thread Daniel Kasak
Chip Wiegand wrote: How do I copy all data only from one table into another table? Both tables are in the same database. I have phpMyAdmin and it suppossedly does this, but it is not working, and there are no error messages. Thanks, -- Chip create table table_2 select * from table_1 -- Daniel