INSERT ... SELECT statement

2005-01-21 Thread Stefano Giorgetti
I need to execute an INSERT...SELECT query. INSERT HIGH_PRIORITY INTO stations_data (station_id, Tmin, Tmax, Tmed, RHmin, RHmax, RHmed, rain, Wmax, slpres, insertion_date) ( SELECT stations.station_id AS stId, min(stations_rt_data.T) AS tmax,

re: INSERT... SELECT Statement fails when...

2002-12-20 Thread Victoria Reznichenko
to get around this is to pull the entire column(s) into memory and insert them back in one by one with a repeating INSERT statement. Can anyone tell me the easy way to do this? (I assume there must be a better way) Thanks! Use IGNORE keyword in INSERT .. SELECT statement: http

INSERT... SELECT Statement fails when...

2002-12-19 Thread Andrew Kuebler
and insert them back in one by one with a repeating INSERT statement. Can anyone tell me the easy way to do this? (I assume there must be a better way) Thanks! Andrew - Before posting, please check: http://www.mysql.com

Re: INSERT... SELECT Statement fails when...

2002-12-19 Thread Paul DuBois
this is to pull the entire column(s) into memory and insert them back in one by one with a repeating INSERT statement. Can anyone tell me the easy way to do this? (I assume there must be a better way) Thanks! Either use INSERT IGNORE or REPLACE, depending on whether you want to ignore subsequent

Re: INSERT... SELECT Statement fails when...

2002-12-19 Thread Keith C. Ivey
On 19 Dec 2002, at 12:19, Andrew Kuebler wrote: When I run an INSERT. SELECT query and I am inserting the records into a new table that has a UNIQUE key, the statement will fail as soon as it hits a Duplicate entry error. You probably want to use INSERT IGNORE:

INSERT INTO Statement

2001-01-21 Thread Lee Jenkins
Hi all, I trying to insert values from one table into another table, but keep getting an error that the columns don't match. Do I have to select from the one table in the same order that the columns are in the table I'm trying to insert into? Lee Jenkins General Operations DataTrak Business

RE: INSERT INTO Statement

2001-01-21 Thread Quentin Bennett
... FROM oldtable; Regards Quentin -Original Message- From: Lee Jenkins [mailto:[EMAIL PROTECTED]] Sent: Monday, 22 January 2001 10:40 To: MySQL Mail list Subject: INSERT INTO Statement Hi all, I trying to insert values from one table into another table, but keep getting an error

RE: INSERT INTO Statement

2001-01-21 Thread Lee Jenkins
... FROM oldtable; Regards Quentin -Original Message- From: Lee Jenkins [mailto:[EMAIL PROTECTED]] Sent: Monday, 22 January 2001 10:40 To: MySQL Mail list Subject: INSERT INTO Statement Hi all, I trying to insert values from one table into another table, but keep getting an error