Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
manideep78
Partner - Specialist
Partner - Specialist

convert SQL data compare logic to QlikView: Compare Yesterday's data to Today's data and display only changed values

Hi Community,

I am trying to build a simple QV app just to show what changed from previous day's data to today's data. 

Data source is oracle and currently planning to take 2 days data initially in two separate QVDs and then a new QVD everyday/reload thereafter. (I appreciate any suggestions here.) 

The real data has around 30-35 columns in total.

Data looks like below:

1st day data:

KeyDateCol1Col2Col3
115/7/2021APW
215/7/2021BQX
315/7/2021CRY
415/7/2021DSZ

 

2nd day data:

KeyDateCol1Col2Col3
116/7/2021AAPWW
216/7/2021BQQX
316/7/2021CRYY
416/7/2021DSZ
516/7/2021ETZZ

 

Expected Output:

First Output table:

Display only New Rows that do not exist in Previous Day

KeyCol1Col2Col3
5ETZZ

 

Second Output Table:

Show only what changed from yesterday to today and transpose to row level.  This is a kind of Delta/ Changelog table.

KeyFieldnameOldValueNewValue
1Col1AAA
1Col3WWW
2Col2QQQ
3Col3YYY

 

I have a logic and solution is currently implemented in SQL. But  this should be in QlikView on a daily basis.

I appreciate any leads/suggestions.

Thank you in advance.

Labels (3)
3 Replies
Vikash
Contributor III
Contributor III

Hi,

For displaying the first output table-

[1st day data]:

LOAD Key,
Date,
Col1,
Col2,
Col3
FROM Day1_Table;

NoConcatenate

[2nd day data]:

LOAD Key,
Date,
Col1,
Col2,
Col3
FROM Day2_Table where not exists(Key);

Drop Table [1st day data];

VK

 

manideep78
Partner - Specialist
Partner - Specialist
Author

Hi Vikash,

Thank you for the reply. Yes, I got the first part and I'm looking more for second output. I will appreciate any leads.

 

manideep78
Partner - Specialist
Partner - Specialist
Author

Hi All,

I appreciate any pointers to this.