Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

thnkgreen
Contributor

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
Highlighted
MVP & Luminary
MVP & Luminary

Re: Load statement exluding multiple values from another table

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
Honored Contributor II

Re: Load statement exluding multiple values from another table

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

Highlighted
MVP & Luminary
MVP & Luminary

Re: Load statement exluding multiple values from another table

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

MVP
MVP

Re: Load statement exluding multiple values from another table

Try:

Load  Field1 From firsttable;

Finaltable:

Load

       Field1,

       Field2,

      ....

From MainTbale Where Not Exists(Field1,Field1);

thnkgreen
Contributor

Re: Load statement exluding multiple values from another table

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

thnkgreen
Contributor

Re: Load statement exluding multiple values from another table

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

thnkgreen
Contributor

Re: Load statement exluding multiple values from another table

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.

MVP
MVP

Re: Load statement exluding multiple values from another table

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