Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Use of 'Where Exists'

Hi all...

I want to understand how the combination of keywords 'where exists' & 'where not exists' works in Qlikview.

Suppose I have 2 tables and I want to load the records by checking on some field by using "where exists".

How can this be done?

Can anybody please explain by providing a simple example?

Help is appreciated.

4 Replies
Gysbert_Wassenaar

Have a look at the Exists entry in the help file. It has some examples.

Or try reading some discussion by searching for this topic: http://community.qlik.com/search.jspa?q=where+exists


talk is cheap, supply exceeds demand
oknotsen
Master III
Master III

Assuming theKey is your key field, use this code to only load from table2 the rows that are not yet loaded:

Load

theKey,

A,

B,

C

from table2

where not exist (theKey);

Assuming anotherKey needs to be matched against theKey and only load rows where there is no match, us something like this:

Load

anotherKey,

A,

B,

C

from table2

where not exist(theKey, anotherKey);

Both examples assume table1 with theKey are already loaded.

May you live in interesting times!
Anonymous
Not applicable
Author

Thanks Gysbert....that link is really useful !

Anonymous
Not applicable
Author

Nicely explained with a simple example...thanks for the help !!