|
#1
|
|||
|
|||
|
Merge SQLite3 database files
Dear all,
I looked for a way to merge SQLite3 database files. I have several files with the same structure (1 table, all the same field names) and I want to get the all data in 1 file. I did not find an SQL command to do this. Does anyone know a way to do this? thanks gert |
|
#2
|
||||
|
||||
|
if your databases are small like : ~10 MB
you can load and export database fields to a XML in memory and close database then open your main database and import that XML into main database for example Step 1 : Code:
anydb:open() query databse and fill a XML structure in memory anydb:close() Step 2 : Code:
maindb:open() run a loop on prepared XML and and insert records to main database maindb:close() CleanupXML() |
|
#3
|
|||
|
|||
|
Smart, I'll give that a try, but my db will be quite big...
This was what I was trying to do (from command line): > sqlite> attach 'c:\test\b.db3' as toMerge; > > sqlite> insert into AuditRecords select * from toMerge.AuditRecords; COMMIT; > > sqlite> detach database toMerge; But I could not figure out how to do the COMMIT. thanks for your help. I really appreciate it. gert |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
All times are GMT -6. The time now is 08:35 AM.









Linear Mode
