Having issues with duplicates while inserting values from excel to sql database. in my database I have a table sanction with 15 columns. my query:
INSERT INTO sanction (
                id,
                organization_type, organization, date,
                decision_number, penalty_type, penalty_way,
                penalty, violation, execution_period,
                article, note, type_npa,
                department, uploaded_date)
                VALUES (
                null,
                   %s, %s, STR_TO_DATE(%s,"%%d.%%m.%%Y"),
                %s, %s, %s,
                %s, %s, STR_TO_DATE(%s,"%%d.%%m.%%Y"),
                %s, %s, %s,
                %s, %s)
Tried if not exist, unique didn't help. can somebody help me with query? Want to use it without creating temporary table, and uniques. thanks!