Hello,

Thanks for your response.
I'm almost there but I keep getting sql syntax error (near col1) with the last 
part of the query 
where(not exists in db2);

Here's where I'm at:

select 'db1', db1.table1.col1, 'db2', db2.table2.col1 from db1.table1, 
db2.table2 WHERE (NOT EXISTS col1 IN db2);


Thanks.

--- On Fri, 9/24/10, Rich Shepard <rshep...@appl-ecosys.com> wrote:

From: Rich Shepard <rshep...@appl-ecosys.com>
Subject: Re: [sqlite] Query to compare two sqlite databases
To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
Date: Friday, September 24, 2010, 12:51 PM

On Fri, 24 Sep 2010, luuk34 wrote:

> you mean something like:
> select  id1, id2 from callprog a where id1 not in (select b.id1 FROM
> callprog b where b.id1=a.id1 );

   Yeah; much better.

> But what is there is more than 1 column? it will grow in complexity when
> you have a lot of columns.....

   My understanding of the original problem was that rows were about the
same, so finding a common column in db1 which was not in db2 was the need.
As long as there is one unique column common to both tables it makes no
difference how many other columns there are in each one.

Rich
_______________________________________________
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

Reply via email to