SQLite Forum

3 incorrect tables created during import
Login
I'm trying to import a csv file into a existing temporary table, however instead of that happening two empty tables are created in addition to a third table with the first row as the header, none of them being the table I need with the first line as a row not the column name.


```
$ cat import.sql
.mode csv
.shell ls > files
create virtual table temp.files using fts5(file);
.import files temp.files
.mode col
select * from files;

$ sqlite3 '' .read import.sql
Usage: .read FILE
$ # no output
$
$ sqlite3 -init import.sql 
SQLite version 3.34.0 2020-12-01 16:14:00
Enter ".help" for usage hints.
sqlite> select * from files;
sqlite> select * from temp.files;
sqlite> select * from "temp.files";
... -- output with first row as header
```