If you like ruby, I have another idea to get you going (maybe without
needing to write much code):

- Use a registered function to SQLite to create MD5 or SHA1 keys for rows
in the table. Here is a ruby snippet that registers a SHA1 function:
http://www.copiousfreetime.org/articles/2009/01/10/writing-sql-functions-in
-ruby.html
- Join both tables by your primary key and select those where the SHA keys
don't match
- go threw each column programmatically in your ruby code and simply
compare column values with each other

If you then need performance and get by some means a trigger for your
newly inserted records, add a sha1 field to all of your tables and
precompute and index the sha1 for each table.

Benjamin Stadin

Am 30.07.13 01:07 schrieb "Fehmi Noyan ISI" unter <fnoyan...@yahoo.com>:

>EXCEPT query gave the different rows in tables, but what I am after is
>the different values for existing records.
>
>The column names are exactly the same, however the number of rows may
>differ (with most of the records are the same).
>
>
>________________________________
> From: Simon Slavin <slav...@bigfraud.org>
>To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
>Sent: Monday, July 29, 2013 9:10 PM
>Subject: Re: [sqlite] Comparing two tables column by column
> 
>
>
>On 29 Jul 2013, at 12:36pm, Fabian Klebert
><f.kleb...@klebert-engineering.de> wrote:
>
>> Wouldn't 
>> 
>> SELECT * FROM table1
>> EXCEPT
>> SELECT * FROM table2
>> 
>> solve this problem?
>> I think it does for the example provided. Not sure if it would work in
>>real-world environment.
>
>There are two elements: making sure the same rows are present, and making
>sure the contents of the rows match.  I would probably use EXCEPT
>commands to find out entries in one database which weren't in the other,
>then use INTERSECT command to check that the fields in the rows which
>were in both.  But that's just at first glance.
>
>Simon.
>_______________________________________________
>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

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

Reply via email to