SQLite Forum

Feature request: Import csv into a table with generated columns
In cases where I didn't control the columns of the original database, I often give up trying to import the CSV file directly.  Instead import into a table with columns which match the CSV file, then use

<code>INSERT INTO table SELECT ...</code>

to get the data where I want it, then

<code>DELETE FROM …</code>

to remove all rows from the temporary table.

This gives you extreme simplicity of code, making it easy for other people to figure out how things work, but also lets you do almost everything inside SQLite, exploiting how good it is at manipulating data.