I have a table with many columns, primary key is AUTOINCREMENT and starting from 1. I am parsing csv data from files row by row, and there can be duplicate rows.
In this case I need to check if in table Main already exist row with same values for all variables listed below (with incremental primary key of course) and if not exist, create new row with these variables.
INSERT OR IGNORE not working in this case and I don't understand why.
Thanks in advance
cur.execute('''INSERT OR IGNORE INTO Main (sku_id, skucat_id, prodline_id, lor_id,
skucat_id, georegion_id, geosector_id, month, year,
sellin_un, sellin_rur, sellout_un, sellout_rur)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)''', (sku_id,
skucat_id, prodline_id, lor_id, skucat_id, georegion_id,
geosector_id, month, year, sellin_un, sellin_rur,
sellout_un, sellout_rur, ))