SQLite Forum

import mishandles table name
Login
You opened an in-memory database. That database is by definition transient (aka temporary) but it is known as "main".

So why not just import into a table named summary. Then if you want to do some manipulation of the data to go into a persistent file, just attach that file with a specified name:

```
attach 'somefile.db' as nottemp;
```

Then you can do all the data manipulation you want from the temporary database named main into the persistent database named nottemp.

```
insert into nottemp.sometable
select some-list-of-columns
from main.summary
where some-list-of-conditions
```

I used that very technique for a data import project last year at work, importing awful looking CSV into a memory-based database named main, then transformed the data into a nicer format in tables in a database that I attached from a file.