Re: [sqlite] Table Exists Query

2009-08-16 Thread Pavel Ivanov
Why not make it this way: select 'database1', lists.* from database1.lists union all select 'database2', lists.* from database2.lists; This way you will know exactly which lists persist in which database. Pavel On Sat, Aug 15, 2009 at 10:57 AM, Andrew Gatt wrote: > Simon Slavin wrote: >> On 15

Re: [sqlite] Table Exists Query

2009-08-15 Thread Simon Slavin
On 15 Aug 2009, at 3:57pm, Andrew Gatt wrote: > Simon Slavin wrote: >> On 15 Aug 2009, at 3:12pm, Andrew Gatt wrote: >> >>> but by my scheme you can't be sure if the list_1 table exists in >>> database2, >> >> Add a column to your 'lists' tables which says which database they're >> part of. So e

Re: [sqlite] Table Exists Query

2009-08-15 Thread Andrew Gatt
Simon Slavin wrote: > On 15 Aug 2009, at 3:12pm, Andrew Gatt wrote: > > >> but by my scheme you can't be sure if the list_1 table exists in >> database2, >> > > Add a column to your 'lists' tables which says which database they're > part of. So every row of the database will have the sam

Re: [sqlite] Table Exists Query

2009-08-15 Thread Andrew Gatt
Roger Andersson wrote: > > I have multiple databases, both have a table called "lists" inside this > table is the names of other tables in the database that make up the lists. > Each individual list is made up of the tables that have the same name in > each database (the list is split between diffe

Re: [sqlite] Table Exists Query

2009-08-15 Thread Simon Slavin
On 15 Aug 2009, at 3:12pm, Andrew Gatt wrote: > but by my scheme you can't be sure if the list_1 table exists in > database2, Add a column to your 'lists' tables which says which database they're part of. So every row of the database will have the same value. Simon. _

Re: [sqlite] Table Exists Query

2009-08-15 Thread Roger Andersson
Maybe something like select db1.* from database1.lists db1 union select db2.* from database2.lists db2; and select db1.* from database1.list_2 db1 union all select db2.* from database2.list_2 db2; /Roger -Ursprungligt meddelande- Från: sqlite-users-boun...@sqlite.org [mailto:sqlite-users