Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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
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.
Thanks Gysbert....that link is really useful !
Nicely explained with a simple example...thanks for the help !!