Relative Content

Tag Archive for sqlitesql-insertnotnullconstraint-handling-rules

SQLite Insert or replace AND On Conflict Do Nothing

I am working on a database that will be populated using a Python script that reads data from a Excel file and then executes SQLite Queries. The data in the Excel file will be updated regularly and in addition to that will also contain incomplete data.
So I am trying to find a SQLite statement that will allow data to be inserted if the data is ‘correct and new’ or updated if the data is changed.
I do not want to add NULL data to the database tables, because that would defeat the purpose of moving the data from a excel file to the DB. Also I do not want to filter the data in Python because I have a cool database that should be able to handle that. (If I can figure out how to tell it to actually do it)

SQLite Insert or replace AND On Conflict Do Ignore

I am working on a database that will be populated using a Python script that reads data from a Excel file and then executes SQLite Queries. The data in the Excel file will be updated regularly and in addition to that will also contain incomplete data.
So I am trying to find a SQLite statement that will allow data to be inserted if the data is ‘correct and new’ or updated if the data is changed.
I do not want to add NULL data to the database tables, because that would defeat the purpose of moving the data from a excel file to the DB. Also I do not want to filter the data in Python because I have a cool database that should be able to handle that. (If I can figure out how to tell it to actually do it)