Jump to content

How can I compare two tables using Sqlite?


Recommended Posts

Link to comment
Share on other sites

  • 1 month later...

Ptrex,

Here is what I am trying todo. Get data from two tables in Oracle and find out what the differences are between them. I would like to extract the Oracle data using ODOR into Sqlite (for some reason the inserts are really slow) or Access (not sure how to do this?).

I just want the fastest way of doing this task. I tried exporting to a text file and writing my own diff functions but these tables are huge so it takes like days for the diff to complete. So i figured importing the data into a another local database and then doing the diff would be faster. Like you mentioned that I should use the sql "Join", I understand the syntax of it but not sure how I am gonna get back the differences by row and column? Please advise.

Thanks in advance,

DjDeep

Link to comment
Share on other sites

Ptrex,

Here is what I am trying todo. Get data from two tables in Oracle and find out what the differences are between them. I would like to extract the Oracle data using ODOR into Sqlite (for some reason the inserts are really slow) or Access (not sure how to do this?).

I just want the fastest way of doing this task. I tried exporting to a text file and writing my own diff functions but these tables are huge so it takes like days for the diff to complete. So i figured importing the data into a another local database and then doing the diff would be faster. Like you mentioned that I should use the sql "Join", I understand the syntax of it but not sure how I am gonna get back the differences by row and column? Please advise.

Thanks in advance,

DjDeep

Why don't you perform this task under Oracle itself? That should be much more efficient than any other way.

Next efficient solution would be to read the Oracle data into memory (array) and compare them from there with the second table, writing only the differences to a file.

Link to comment
Share on other sites

Why don't you perform this task under Oracle itself? That should be much more efficient than any other way.

-I dont have access to the Oracle tools and I only have read-only access to the oracle database.

Next efficient solution would be to read the Oracle data into memory (array) and compare them from there with the second table, writing only the differences to a file.

-As I stated earlier...

tried exporting to a text file and writing my own diff functions (using Arrays) but these tables are huge so it takes like days for the diff to complete.

-The biggest problem with this was the speed. Some tables have around a 500,00 rows or more.
Link to comment
Share on other sites

  • 14 years later...

There's also the sqldiff.exe program available from the SQLite team: https://www.sqlite.org/sqldiff.html

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

  • Developers
1 hour ago, Konstantin-S said:

I am the author of these tools.

So you registered for free advertisement? 
The thread has a grey beard like me!

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...