Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sdtfll
Contributor III
Contributor III

how to understand where not exists function

I searched some posts and tried but still not fully understand the where exists function,

show my code as below,

 

First:
LOAD F1 as F1Reduce,F2 INLINE [
F1, F2
1, North
2, South
];

Second:
LOAD * INLINE [
F1, F2
1, North
2, South
3, West
];

//goal: get the West to a single table by searching the field F1 value in First table, ==> the "3,west" not exist in First

Third:
NoConcatenate load * Resident Second
where not exists(F1Reduce,F1);  //cannot work

tried:

where not exists(First.F1Reduce,F1);  //cannot work

where not exists(F1,First.F1Reduce);  //cannot work

where not exists(F1,F1Reduce);  //cannot work

 

then I tried another method, via the field F2,

Third:
NoConcatenate load * Resident Second
where not exists(F2);  //because F2 already loaded in First table, here only offer one field F2 to search, cannot work.

where not exists(First.F2, F2);  //ok then, by designate the searching file First.F2, failed ..

 

 

Labels (1)
  • on

2 Replies
Saravanan_Desingh

Try this,

First:
LOAD F1 as F1Reduce,F2 INLINE [
F1, F2
1, North
2, South
];

Second:
LOAD * INLINE [
F1, F2
1, North
2, South
3, West
];

//goal: get the West to a single table by searching the field F1 value in First table, ==> the "3,west" not exist in First

Third:
NoConcatenate load * Resident Second
where not exists(F1Reduce,F1);  //cannot work

Drop Table First, Second;
marcus_sommer

I think your third step is already one too much - why not applying the exists-check within the second load? I would say the case is similar to this one: Re: How to select, in QlikView, all values from on... - Qlik Community - 1809216

- Marcus