MySQL Forums
Forum List  »  General

Re: No duplicate records, ignore
Posted by: Nunya Beeznass
Date: November 18, 2020 05:07AM

Well, seems with a little effort, I found a way. I created a second new table to hold the 20 new records. Then I use the following insert select statement to add to processing table and truncate the holding table. I could probably do it with temp tables but I'm lazy and this works. Thanks tho

INSERT INTO exData (At,basecurid,Amount,Price,paircurid,Type)
SELECT n.At,n.basecurid,n.Amount,n.Price,n.paircurid,n.Type FROM exNewData n LEFT JOIN exData e on (n.At = e.At AND n.basecurid = e.basecurid and n.Price = e.Price and n.paircurid = e.paircurid) WHERE IS NULL;

Options: ReplyQuote

Written By
November 17, 2020 09:36AM
Re: No duplicate records, ignore
November 18, 2020 05:07AM

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.