MySQL Forums
Forum List  »  Newbie

Question about load data infile command
Posted by: George Jewell
Date: June 09, 2009 02:26PM

Hello,

I have two tables with identical structure. One is for archived records, one for temporary use. I would like to use 'select into outfile...' to export the temporary records to a file, and then use 'load data infile' to import into the archive table. I have a primary key field (record_id), and this causes a duplicate key error when trying to import. I looked at the REPLACE and IGNORE switches, but I need to preserve ALL records not replace or ignore ones with a duplicate key. Am I looking at the wrong solution here? Thanks.

Options: ReplyQuote


Subject
Written By
Posted
Question about load data infile command
June 09, 2009 02:26PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.