MySQL Forums
Forum List  »  General

Re: No duplicate records, ignore
Posted by: Nunya Beeznass
Date: November 17, 2020 07:37PM

Table has 4 columns, id (autoincrement,primary,index), dt (datetime), temp (float), pres (float).

When the first bulk insert is made of 20 rows, there are no duplicates - ever. Those are accurate. The script checks an api call for the last 20 records without knowing when they update or how many new rows there are, so the call has to be made every hour. There may be 2 new rows or 8 new rows but only 20 max rows at a time. I only want to insert the new rows but the data I get from the API call is only dt, temp, pres (no primary index).

** There may be multiple records with the same dt AND the same temp, but never ALL 3 columns the same. But pres is NOT an index, primary, autoincrement.

I want to check each record against all three rows being the same, then insert if not.

Sorry if that's confusing.

Options: ReplyQuote


Subject
Written By
Posted
November 17, 2020 09:36AM
Re: No duplicate records, ignore
November 17, 2020 07:37PM


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.