Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Database Comparison

I just started working with qlikview and new to it. And help to create an application

I am trying to create a utility to compare data from 2 databases. We usually dump Request data from Prod  to our Dev environment.

I need to compare data from two Databases having same Table and Column Names.

For every Table, I need to compare column Values. There is 1 key filed say Request Id  against which I will compare data whether it matches or not.

Please suggest, how to proceed on this.

4 Replies
amit_saini
Master III
Master III

Vineeta,

Please see the attachment, In this I'm loading data from two source having common connection. I'm comparing data by using if statement kindly see the script in attached application.

Thanks,
AS

amit_saini
Master III
Master III

Sorry, Please follow this attachment.

Thanks,
AS

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I would load the data into a single table likes this:

Compare:

LOAD *,

  'DB1' As Source;

SQL SELECT * From DB1.Table;

Concatenate

LOAD *,

  'DB2' As Source;

SQL SELECT * From DB2.Table;

Now you can use expressions like these to compare the data and to perform difference calculations:

Sum({<Source={'DB1'}>} Value)

Sum({<Source={'DB2'}>} Value)

Count({<Source={'DB1'}>} Value) - Count({<Source={'DB2'}>} Value)

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

I am also following the same way. But there are around 50 tables and more than 300 columns , which is consuming lots of time due to manual work . Do I need to write alias for each of the table. or any other alternative