Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparing two qvd file

How will I be able to get values from a qvd file which are not available when compared to other qvd. For example I have Contract Account and Document Number in a qvd file (qvd1). I want to get all those Document Numbers from qvd2 that were not in qvd1. Thank you in advance.

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Please check the attached file for solution.

Hope this helps you.

Regards,

Jagan.

View solution in original post

7 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

Table1:

LOAD

     ContractAccount,

     DocumentNumber

FROM FileName1.QVD;

Table2:

LOAD

     ContractAccount,

     DocumentNumber

FROM FileName1.QVD

WHERE NOT EXISTS(DocumentNumber);

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

I tried this but it did not work. Here's what I actually did.

Table1:
LOAD
    VKONT,
OPBEL
FROM test.qvd;

 
Table2:
LOAD
    trim(right(VKONTHist,8)) as VKONT,
OPBELHist as OPBEL,
FROM test2.qvd WHERE NOT EXISTS(OPBEL);

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try renaming OPBELHist as OPBEL in the QVD itself and then do the same.

Regards,

Jagan.

Not applicable
Author

Hi Jagan,

I tried what you suggested but it still did not work.

Heres what I'm trying to do.

QVD1QVD2
CONTACCTDOCNUMCONTACCTDOCNUM
1a1a
b2c
2c3e
3d
e

I just want to get only docnum B and D since it is not in QVD2. Thank you in advance.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Please check the attached file for solution.

Hope this helps you.

Regards,

Jagan.

Not applicable
Author

You should do it like this:

Table1:
LOAD
VKONT,
OPBEL
FROM test.qvd;


Table2:
LOAD
trim(right(VKONTHist,8)) as VKONT,
OPBELHist as OPBEL,
FROM test2.qvd WHERE NOT EXISTS(OPBEL,OPBELHist );

I added a secon parameter to the exist function. Since when you try for the existens you dont have OPBEL in test2.qvd.

Not applicable
Author

Hi Jagan and Hansiola,

It did work. Thank you very much for the help.

Regards,

JC