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: 
qlikviewalex
Contributor III
Contributor III

Difference between two tables

Hi,

I want to load the fields of a table which are not contained in another.

Does anyone have an idea how I can implement this?

Alex

3 Replies
ahaahaaha
Partner - Master
Partner - Master

Hi Alex,

As variant

S:

LOAD*,

0 as Flag,

A&'|'&'|'&B&'|'&C as Key; //include fields that do not to be the same

LOAD*Inline              

[A, B, C              

7, 8, 9

4, 5, 6

];

R:

LOAD*,

If(Exists(Key, A&'|'&'|'&B&'|'&C)=-1, 0, 1) as Flag,

A&'|'&'|'&B&'|'&C as Key; //include fields that do not to be the same

LOAD*Inline

[A, B, C

1, 2, 3

4, 5, 6

];

NoConcatenate

R\S:

LOAD

A, B, C

Resident S

Where Flag = 1;

DROP Table S;

Result

1.jpg

Regards,

Andrey

prma7799
Master III
Master III

Please share your expected output.

antoniotiman
Master III
Master III

Hi,

may be this

R:
LOAD * Inline [
A,B,C
1,2,3
4,5,6
]
;
Join
Load *,1 as Flag Inline [
A,B,C
7,8,9
4,5,6
]
;
LOAD A,B,C Resident R Where Flag <> 1;
Drop Table
R;

Regards,

Antonio