Re: [sqlite] Combining two databases into one

2013-11-11 Thread Dave Wellman
number: 3917021 Registered in England and Wales. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: 11 November 2013 14:35 To: General Discussion of SQLite Database Subject: Re: [sqlite] Combining two databases into

Re: [sqlite] Combining two databases into one

2013-11-11 Thread Dave Wellman
November 2013 20:28 To: General Discussion of SQLite Database Subject: Re: [sqlite] Combining two databases into one May be there is a simple way depending of what means 'combine all the data'. If that means just _see_ all that data (without the oportunity to manipulate), there could be defi

Re: [sqlite] Combining two databases into one

2013-11-11 Thread Simon Slavin
On 10 Nov 2013, at 8:27pm, David Wellman wrote: > Can I just check something. When you say " Don't forget to DELETE FROM > before you insert your new rows " I assume that you're saying to make sure > that the target table is empty before I do the insert. Yes? Yep, that's it. Common mistake we

Re: [sqlite] Combining two databases into one

2013-11-11 Thread David Wellman
m: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: 10 November 2013 18:32 To: General Discussion of SQLite Database Subject: Re: [sqlite] Combining two databases into one On 10 Nov 2013, at 5:49pm, Dave Wellman wrote: > Ah! I may have ju

Re: [sqlite] Combining two databases into one

2013-11-10 Thread Ulrich Goebel
May be there is a simple way depending of what means 'combine all the data'. If that means just _see_ all that data (without the oportunity to manipulate), there could be defined a VIEW which does a compound SELECT like CREATE VIEW combined_all as SELECT ... from db1.T1 UNION SELECT ... from db

Re: [sqlite] Combining two databases into one

2013-11-10 Thread Simon Slavin
On 10 Nov 2013, at 5:49pm, Dave Wellman wrote: > Ah! I may have just found the answer. If I've got databases db1 and db2 > attached, can I use something like 'insert into db1.t1 select * from > db2.t1;' (assuming that the 't1' definitions are the same !)? That's the best way I know of to do it,

[sqlite] Combining two databases into one

2013-11-10 Thread Dave Wellman
Hi, I'm looking at a use case for SQLITE within one of our applications. One potential scenario would be for multiple, asynchronous processes to build their own database. Each one would be populating a different table. At some point it would be 'really useful' to combine all the data into a sin