Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load statement exluding multiple values from another table

Hello to all.  This problem really has me stumped.  I have a table with one column in it.  This column has about fifty rows, each with a different value.  Basically, the table houses values that do not need to be selected.  I want to be able to query in Qlikview, writing a statement that excludes any of the values from the first table.  Is there a way to do this?  I hope that I have explained this clearly enough.  Thank you

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Something using the exists function:

Table1:

Load A from somewhere;

Table2:

Load B,C,D from somewhereelse

where not exists(A,B); // meaning don't load the records where the value of B exists in field A in table1.


talk is cheap, supply exceeds demand

View solution in original post

7 Replies
er_mohit
Master II
Master II

yeah Supplose

ExcludingField has many value from1 to 100 ; i exclude 3 values like 40,50,13

so ,

you can write this way

load

FieldA,

FieldB,

FieldC,

ExcludingField

from Table

where wildmatch(ExcludingField<>'40','50','13');

if you want exclude one value like 40then try this way to write where condition

where ExcludingField<>'40';

hope it helps you

Gysbert_Wassenaar

Something using the exists function:

Table1:

Load A from somewhere;

Table2:

Load B,C,D from somewhereelse

where not exists(A,B); // meaning don't load the records where the value of B exists in field A in table1.


talk is cheap, supply exceeds demand
tresesco
MVP
MVP

Try:

Load  Field1 From firsttable;

Finaltable:

Load

       Field1,

       Field2,

      ....

From MainTbale Where Not Exists(Field1,Field1);

Anonymous
Not applicable
Author

Thank you all so much for your quick answers.  One last question, though.  Is there a limit to how many values can be excluded?  I have about 50 different values to exclude.  Thanks again to all

Anonymous
Not applicable
Author

Thank you all so much for your quick answers.  One last question, though.  Is there a limit to how many values can be excluded?  I have about 50 different values to exclude.  Thanks again to all

Anonymous
Not applicable
Author

Thanks so much for your quick reply.  To all, my only other question is.... is there a limit to how many values can be excluded?  I have about 50 different values to exclude.  That's why I wasn't sure if I could name the separate table in the select statement that houses that list of values.  Thanks.

tresesco
MVP
MVP

Without any limit, any number of records loaded in the first table will be excluded.