On Thursday 19 December 2002 19: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. No further entries will be inserted. The
> only way I know 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://www.mysql.com/doc/en/INSERT_SELECT.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





---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to