Page 1 of 1

Merging .db files

Posted: Sun Aug 18, 2013 4:28 pm
by Babyprincess
Hello everyone,


Does anyone know how i can merge a few .db files into one ?

Re: Merging .db files

Posted: Wed Aug 21, 2013 10:52 am
by Mark
Hi,

Do you mean SQLite files? Probably, you need to write a script that reads all data from the two (or more) databases and stores it in one new database. After this, you need to rewrite all scripts that used the two separate files and make those scripts compatible with the new database.

You might do this from the sqlite3 command line:

Code: Select all

.mode insert 
.out file.sql 
SELECT * FROM table_name
Kind regards,

Mark