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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
richard_chilvers
Specialist
Specialist

Comparing tables when doing a LOAD

Hi

I have table1 loaded from a QVD file with FIELD1, FIELD2, FIELD3, FIELD4.

I have a 2nd table with the same fields and I want to concatenate only records where the combination of values in FIELD1, FIELD2 and FIELD3 doesn't already exist.

I think this is rather like a PARTIAL LOAD  (ie. add load) but with multiple EXISTS conditions.

Is this possible.

Or is there another way?

Thanks.

1 Solution

Accepted Solutions
its_anandrjs
Champion III
Champion III

Hi,

Write some thing like in your script

table1:

Load

FIELD1,

FIELD2,

FIELD3,

FIELD4,

FIELD1& FIELD2&FIELD3 as Key

from your source;

table2:

concatenate

Load

FIELD1,

FIELD2,

FIELD3,

FIELD1& FIELD2&FIELD3 as Table2Key

from your source

where not Exists(key,Table2Key);

HTH

Regards,

Anand




View solution in original post

4 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try like this:

Table1:

LOAD

autonumber(FIELD1&FIELD2&FIELD3) as Key,

FIELD1,

FIELD2,

FIELD3,

FIELD4

from ....;

Table2:

left join LOAD

autonumber(FIELD1&FIELD2&FIELD3) as Key,

FIELDx,

FIELDy,

FIELDz

from ....;


talk is cheap, supply exceeds demand
its_anandrjs
Champion III
Champion III

Hi,

Write some thing like in your script

table1:

Load

FIELD1,

FIELD2,

FIELD3,

FIELD4,

FIELD1& FIELD2&FIELD3 as Key

from your source;

table2:

concatenate

Load

FIELD1,

FIELD2,

FIELD3,

FIELD1& FIELD2&FIELD3 as Table2Key

from your source

where not Exists(key,Table2Key);

HTH

Regards,

Anand




richard_chilvers
Specialist
Specialist
Author

Thanks for your prompt response.

Will try this - looks like it will work !

Regards

richard_chilvers
Specialist
Specialist
Author

Thanks for your prompt response and helpful answer