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 single
SQLITE database. We'd still be using multiple tables. 

 

Obviously our application can open multiple databases, select all rows from
T1 in one database and insert them into T1 in another database and continue
doing that until we're complete. I can't see any reason why that shouldn't
technically work and it will probably be fast enough from a performance
perspective.

 

Is there a 'smart' way of doing this using built-in functaionality of
sqlite? I looked for a 'merge databases' command or something similar but
couldn't find anything. 

 

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 !)?

 

Cheers,

Dave

 

 

Ward Analytics Ltd - information in motion

Tel: +44 (0) 118 9740191

Fax: +44 (0) 118 9740192

www:  <http://www.ward-analytics.com> http://www.ward-analytics.com

 

Registered office address: The Oriel, Sydenham Road, Guildford, Surrey,
United Kingdom, GU1 3SR

Registered company number: 3917021 Registered in England and Wales.

 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to