Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to compare 2 database?

I Have 2 different database from 2 different sources. It is assumed that the data is same in both. . There are few common headers in both that I can use to start comparing. But due to volume of rows I am going little slow. in addition there are quite a few columns.

wat is the best way to compare these 2 databases to highlight the differences?

3 Replies
sinanozdemir
Specialist III
Specialist III

Hi Eesh,

One way to do is using INFORMATION_SCHEMA.COLUMNS and create two tabs for each database:

Capture.PNG

The first tab is "First Database" and I am pulling TABLE_NAME and COLUMN_NAME from INFORMATION_SCHEMA. Information schema has views, tables and columns names. Also, use QUALIFY TABLE_NAME so that only COLUMN_NAME gets joined.

Capture.PNG

And in the second tab, you do the same. And at the end, your data model will look like this:

Capture.PNG

And in the front-end, you can do your analysis.

Hope this helps.

ramasaisaksoft

Hi Eesh,

Which are the databases you need to compare?

Select count(*) from tablename.

in both tables it will give result check the rows count at both tables in both DB's and confirm by ur self.

syukyo_zhu
Creator III
Creator III

Hi,

Try this

load *, 'old' as source

from your firstdatabase.firsttable;

concatenate

load *, 'new' as source

from your firstdatabase.firsttable;

Then you create a straight table, you add all of fields except source as dimension, and you add count(source) as expression.

you should get 2 for all of line in your table if your deux database are the same.

hope helpful