I want to import a csv file into SQLite db using
sqlite> .separator ,
sqlite> .mode csv data
sqlite> .import test.csv data
where datais the name of a table with three columns, as is the file.
The file has some string value that is encapsulated using double quotes. Some of the string values ​​contain commas in them (the actual example from the file "Bond\, James"), which should be considered as a single column, but SQLite causes an error
Error: test.csv line 2: expected 3 columns of data but found 4
How can I get SQLite to import these values ​​correctly?
source
share