It is currently Sat Oct 19, 2019 6:16 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: merging two database files into a new one
PostPosted: Tue Aug 27, 2019 1:25 pm 
Offline
User
User
User avatar

Joined: Tue Oct 06, 2009 9:11 pm
Posts: 87
Hello there!

i have two database files with the same structure and i would like to merge them into a new database file. How can i achieve that? I was thinking to create an empty database with exactly the same tables and indexes and then import the data from the other 2 databases by .export csv & .import csv to table. Since i haven't much knowledge about SQL i already read a bit about it and studied the structure of the databases with a database viewer. Would you recommend doing this by CSV import functions?

Greetings
A.D.

_________________
Repeat
PureBasic
ForEver


Top
 Profile  
Reply with quote  
 Post subject: Re: merging two database files into a new one
PostPosted: Tue Aug 27, 2019 1:36 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3083
Location: Boston, MA
Use sql attach database and select all rows within an insert statement.
Do not select rowid, else that exists in 1st db.

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: merging two database files into a new one
PostPosted: Tue Aug 27, 2019 1:45 pm 
Offline
Addict
Addict

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 4361
Location: Germany
Which database :?: :?: :?:

SQLite
PostgreSQL
MariaDB
if ODBC which database is behind ...


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: davido and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye