SQLite Forum

Hide rows in table1 if same value found in table2 ?
Login
Yes, you use your own table and column names. I suggest using something a little more descriptive than "table1" and "table2".

Currently you are limiting yourself to the schema of your data source (the csv file). This is keeping you from adopting the simple solution. I would suggest you do the following:

x) Keep a table (maybe call it import_data) that exactly matches the csv file.

x) Define a second table with a descriptive name that has the additional fields you may need, including the "deleted" field.

x) Transfer the imported data using your own dedicated "schema conversion" statement. This could probably be an INSERT INTO .. DELETE FROM import_data RETURNING <field list>;

x) Do all your programming against your own schema. Any changes in the csv file schema or your own schema are handled at exactly one point, the above schema conversion statement.