Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
tab1:
LOAD * INLINE [
F1, F2
A, 1
B, 2
C, 3
D, 4
];
tab2:
LOAD * INLINE [
F3, F4
A, AA
B, BB
C, CC
E, EE
];
Table3:
LOAD
*
RESIDENT tab2
WHERE Exists(F1,F3);
//
//
drop table tab1;
drop table tab2;
the result is nothing
if you want table 3 as result you must add a noconcatenate
Table3:
noconcatenate
LOAD
*
RESIDENT tab2
WHERE Exists(F1,F3);
Lines with F3 = {A,B,C} and corresponding F4 values will exist in Table3;
Peter
But why don't you just run the script and open the table viewer? QlikView is the magical trial-and-maybe-but-you-never-know-error tool!
Peter
hi peter pls calrify me what is the difference between exists and not exists function
Of course, it may be that Table3 gets JOINed to tab2 and dropped in the end... Add NOCONCATENATE to the Table3 LOAD to be sure.
Peter
the result is nothing
if you want table 3 as result you must add a noconcatenate
Table3:
noconcatenate
LOAD
*
RESIDENT tab2
WHERE Exists(F1,F3);
It's the same function: exists(). In the second case, you are logically negating the return value of exists(). NOT is a boolean operator that says that exists() should not return true.
...WHERE Not Exists(F1, F3);
means that each F3 value we are loading should NOT exist in field F1.
Peter
hi i want know how exist function work here can u pls explain me
For every row we load from table tab2, QlikView checks whether the value in column F3 exists in the existing QlikView field F1. It sort of acts like a lookup. If the value exists, the row will be stored in table Table3. Otherwise the row will be dropped.
Peter
Sorry, corrected naming error
thanks