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

2 QVD Compare

Hi

I need to compare 2 file eg

FILE A

Sr no Product

1 P1

2 p2

3 p3

and

FILE AB

Sr no Product

1 P1

2 p4

3 p5

in this i wanted know product exists in both the table pls guide me how i can do this comparison.

thanks in advance.

23 Replies
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi

please enter the following script in your document:

TableA:
LOAD
Srno As SrnoA,
Product
FROM
QvdCompare.xlsx
(ooxml, embedded labels) ;

TableB:
LOAD
Srno as SrnoB,
Product
FROM
QvdCompare2.xlsx
(ooxml, embedded labels);

TableC:
NoConcatenate
Load "SrnoA" As SrnoAB,
'Product in both tables' As Marker, //either
1 As Flag, //or
Product
Resident TableA;

Inner Join (TableC)
Load "SrnoB" As SrnoAB,
'Product in both tables' As Marker, //either
1 As Flag, //or
Product
Resident TableB;

srinivasa1
Creator II
Creator II
Author

Hi Your really g8 its working now.but user same time also asking me to load only date thats not in both the tabel

eg my exmple i wll not load dat p1 can u pls suggest me how i can achive this.

thx in advance

brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi,

change your script like this, than stays only TableD (=TableA without product in both tables) and TableE (=TableB without product in both tables):

TableC:
NoConcatenate
Load "Sr no A" As SRNoAB,
'Product in both tables' As Marker,
Product,
Product As ProductBoth
Resident TableA;

Inner Join (TableC)
Load "Sr no B" As SRNoAB,
'Product in both tables' As Marker,
Product,
Product As ProductBoth
Resident TableB;

TableD:
NoConcatenate
LOAD * Resident TableA
Where Not Exists(ProductBoth,Product);

TableD:
NoConcatenate
LOAD * Resident TableB
Where Not Exists(ProductBoth,Product);

Drop Table TableA, TableB, TableC;

srinivasa1
Creator II
Creator II
Author

Thank you Martina its working.........