MySQL Forums
Forum List  »  General

No duplicate records, ignore
Posted by: Nunya Beeznass
Date: November 17, 2020 09:36AM

I am trying to do a bulk insert with 20 records at a time. Mysql, linux deb 8, php, python. Table Structure: id(uniq,ai),dt(datetime),temp(float),pres(float) - id is not inserted. I want to ignore records where dt and temp are unique (but not unique keys).
For instance, update 1 with no duplicates = 20 new records. Update 2 is only 25% new. 5 records have dropped off and 5 records are new. When the bulk insert runs again, only the last 5 records are inserted because their dt and temp colums did not not have duplicates and the 15 duplicates are ignored.

I've tried different variations of INSERT IGNORE, REPLACE INTO, and ON DUPLICATE KEY UPDATE

Any help is appreciated.

- miner

Options: ReplyQuote

Written By
No duplicate records, ignore
November 17, 2020 09:36AM

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.