thanks for your reply Can you or someone provide the exact syntax for ATTACH and then the subsequent SQL syntax so I get the equivalent to:
"select * db1..tbl1 a , db2..tbl2 b where a.id=b.id" Thanks again! --- On Sun, 3/14/10, P Kishor <punk.k...@gmail.com> wrote: > From: P Kishor <punk.k...@gmail.com> > Subject: Re: [sqlite] syntax for sqlite to query across 2 databases > To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org> > Date: Sunday, March 14, 2010, 9:02 PM > On Sun, Mar 14, 2010 at 6:01 PM, > David Lyon <david_ly...@yahoo.com> > wrote: > > if I had a database called db1 with table tbl1 with > field id and a second db called db2 and a table called tbl2 > with field id, whats the correct syntax to query across the > 2 databases eg: > > > > "select * db1..tbl1 a , db2..tbl2 b where a.id=b.id" > > > > This doesnt work, can someone modify it to work? > > > > You can't query across two separate databases with one db > connection, > because a connection is to one db at a time. > > You can ATTACH the second db to the first db, and then, for > all > purposes, you have one db within which you can make queries > across > tables. > > > > > > > Thanks for your help in advance. > > > > > > Dave > > > > > > > > > -- > Puneet Kishor > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users