Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

WHAT IS OUTPUT FOR THIS

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;

1 Solution

Accepted Solutions
maxgro
MVP
MVP

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);

View solution in original post

10 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Lines with F3 = {A,B,C} and corresponding F4 values will exist in Table3;

Peter

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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

Not applicable
Author

hi peter pls calrify me what is the difference between exists and not exists function

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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

maxgro
MVP
MVP

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);

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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

Not applicable
Author

hi i want know how exist function work here can u pls explain me

Peter_Cammaert
Partner - Champion III
Partner - Champion III

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

Not applicable
Author

thanks