I am using sqlite3 and I am writing my scripts in two files. The first one is called "Books.sql"
DROP TABLE IF EXISTS Books; CREATE TABLE Books ( books_id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT, author TEXT, );
The second one is called "Import_books.sql "
.mode csv Books .import C:/Users/Jim/books_data.csv Books
My goal is to import in "Import_books.sql", the csv file "books_data.csv" that contains a list of books into the table Books that I created in "Books.sql"
I made sure the csv matches exactly the structure of the table but I get this error INSERT failed: datatype mismatch. How can I solve this?