I'm aware of that a very similar question has been asked here. However, I'm unable to implement the solution there given: when I try to run the script beginning ATTACH DATABASE 'other.db' AS other;
I get an error saying that it couldn't connect to other.db, despite there being such a file in that directory.
I've got two SQLite databases, database_a.db and database_b.db. I want to copy a table, named Table_to_be_copied, from database_a.db to database_b.db. Table_to_be_copied has no analogue or equivalent in database_b.db and I can't assume anything about said table except for its name; I can't assume how many columns it has, or what they're called.
I want to copy Table_to_be_copied wholesale: name, columns and rows. What's the easiest way of achieving this? (For what it's worth, I'm connecting to the databases via Python scripts.) I know one way of copying the table, but it's not very elegant: it involves writing a script which reads all the data required from database_a.db into memory and then recreating the table from scratch in database_b.db. But is there a better way?