INSERT ... SELECT question

2004-03-29 Thread Eric J. Janus
I have a table with just about 100 columns, and I would like to duplicate a row exactly, except for one column, which is the AUTO_INCREMENT column. Using 'INSERT INTO tbl_name SELECT * FROM tbl_name WHERE id_col = 1' doesn't work, because it produces the following error: 'ERROR 1062: Duplicate

RE: INSERT ... SELECT question

2004-03-29 Thread Matt Chatterley
, col2, col3: INSERT INTO table (col2, col3) SELECT col2, col3 FROM table2 WHERE id_col=1; Regards, Matt -Original Message- From: Eric J. Janus [mailto:[EMAIL PROTECTED] Sent: 29 March 2004 19:37 To: MySQL Subject: INSERT ... SELECT question I have a table with just about 100 columns

RE: INSERT ... SELECT question

2004-03-29 Thread Eric J. Janus
was hoping that MySQL had something built in to make this easier. Thanks, Eric -Original Message- From: Matt Chatterley [mailto:[EMAIL PROTECTED] Sent: Monday, March 29, 2004 2:11 PM To: 'Eric J. Janus'; 'MySQL' Subject: RE: INSERT ... SELECT question Importance: Low Can you

RE: INSERT ... SELECT question

2004-03-29 Thread Matt Chatterley
: INSERT ... SELECT question There is only 1 table. I want to replicate a record in a table except the AUTO_INCREMENT column. Your solution would work, but I'd prefer to not have to maintain a list of columns in the application. Worst case I'll have the application generate the query based

RE: INSERT ... SELECT question

2004-03-29 Thread Eric J. Janus
, March 29, 2004 2:25 PM To: 'Eric J. Janus'; 'MySQL' Subject: RE: INSERT ... SELECT question Importance: Low Oh, if only there were views!! That would make this easy. Maybe soon (*please*). :) Another approach (more cumbersome) might be to insert the rows you need to duplicate into a temporary

RE: INSERT ... SELECT question

2004-03-29 Thread Henrik Schröder
an appropriate where-clause to the above statement. /Henrik -Original Message- From: Eric J. Janus [mailto:[EMAIL PROTECTED] Sent: den 29 mars 2004 21:28 To: Matt Chatterley; 'MySQL' Subject: RE: INSERT ... SELECT question Views would be nice. :) That idea sounds like it would work

RE: INSERT ... SELECT question

2004-03-29 Thread Eric J. Janus
the application everytime I change the table, which I don't always want to do. -Original Message- From: Henrik Schröder [mailto:[EMAIL PROTECTED] Sent: Monday, March 29, 2004 3:07 PM To: 'Eric J. Janus'; 'MySQL' Subject: RE: INSERT ... SELECT question Importance: Low

Re: another insert select question

2003-11-05 Thread Egor Egorov
Jason Joines [EMAIL PROTECTED] wrote: Table employees: | idnumber | email | phone | address | Table webusers: - | idnumber | userid | website | -

Re: another insert select question

2003-11-05 Thread Jason Joines
Egor Egorov wrote: Jason Joines [EMAIL PROTECTED] wrote: Table employees: | idnumber | email | phone | address | Table webusers: - | idnumber | userid | website | -

Re: another insert select question

2003-11-05 Thread Jason Joines
Jason Joines wrote: Egor Egorov wrote: Jason Joines [EMAIL PROTECTED] wrote: Table employees: | idnumber | email | phone | address | Table webusers: - | idnumber | userid | website |

another insert select question

2003-11-04 Thread Jason Joines
Table employees: | idnumber | email | phone | address | Table webusers: - | idnumber | userid | website | - Table employees is completely populated. Table

Re: Insert ... Select question

2003-10-29 Thread
I use this syntax but I have privilege problem. Thenk you anyway - Original Message - From: Nitin [EMAIL PROTECTED] To: IEEIO AAOOCO [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, October 27, 2003 5:20 PM Subject: Re: Insert ... Select question of course, the syntax is: insert

Insert ... Select question

2003-10-27 Thread
Hello list I want to insert ... select data from table1 of db1 to table2 of db3. Is that possible? Thank in advance -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Insert ... Select question

2003-10-27 Thread Nitin
27, 2003 8:28 PM Subject: Insert ... Select question Hello list I want to insert ... select data from table1 of db1 to table2 of db3. Is that possible? Thank in advance -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com

RE: Insert ... Select question

2003-10-27 Thread Fortuno, Adam
... Select question Hello list I want to insert ... select data from table1 of db1 to table2 of db3. Is that possible? Thank in advance -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General

Re: INSERT SELECT QUESTION

2001-09-09 Thread Paul DuBois
At 8:44 PM -0500 9/9/01, Marcus Young wrote: Hi, I'm fairly new to MySQL. I'm trying to insert data into a table where one field is derived from a SELECT on another table (a key) and the other fields are defined directly (eg field_01=abcd) . The formats I have been trying don't appear to be

Re: INSERT SELECT QUESTION

2001-09-09 Thread Calvin Chin
PROTECTED] Date: Sun, 09 Sep 2001 20:44:23 -0500 Subject: INSERT SELECT QUESTION Hi, I'm fairly new to MySQL. I'm trying to insert data into a table where one field is derived from a SELECT on another table (a key) and the other fields are defined directly (eg field_01=abcd) . The formats I