Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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
MVP
MVP

Re: WHAT IS OUTPUT FOR THIS

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

10 Replies

Re: WHAT IS OUTPUT FOR THIS

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

Peter

Re: WHAT IS OUTPUT FOR THIS

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

Re: WHAT IS OUTPUT FOR THIS

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

Re: WHAT IS OUTPUT FOR THIS

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

MVP
MVP

Re: WHAT IS OUTPUT FOR THIS

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

Re: WHAT IS OUTPUT FOR THIS

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

Re: WHAT IS OUTPUT FOR THIS

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

Re: WHAT IS OUTPUT FOR THIS

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

Re: WHAT IS OUTPUT FOR THIS

thanks

Community Browser