Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Sir_12345
Partner - Contributor
Partner - Contributor

Exclude values

Hey,

I  have a table1 with a Customer field and another table2 with many fields, among them a field Customer. I 'd like to exclude from table2, the customers that are in Table1.

Any help on this??

Thanks

Labels (1)
3 Replies
BrunPierre
Partner - Master
Partner - Master

Hi, Try something like this.

T1:
LOAD CustID as LookupID,
Cust
FROM SourceTable1;

T2:
LOAD CustID,
Cust,
DOB,
Gender,
"Phone Number"

FROM SourceTable2
Where not Exists(LookupID,CustID);

DROP Table T1;

DROP Fields CustID, DOB, Gender, "Phone Number"; //Optional - comment this line if the other fields in T2 are relevant.

Sir_12345
Partner - Contributor
Partner - Contributor
Author

Thanks for the response!

If I 'd like to use a resident table, how could I do it?

BrunPierre
Partner - Master
Partner - Master

T1:
LOAD CustID as LookupID,
Cust
FROM SourceTable1;

T2:
LOAD CustID,
Cust,
DOB,
Gender,
"Phone Number"
FROM SourceTable2;

NoConcatenate
Final:
LOAD *
Resident T2
Where not Exists(LookUpID, CustID);
DROP Tables T1, T2;