Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
subbareddykm
Creator II
Creator II

How to Exclude values from two fields?

Hi All,

I have Table Like this:

Data_Temp:

Load * Inline [

Emp_Role

X

];

Data:

Load ID,  

        Employee_Name,

        Emp_Role,

       Code

From.............. Wher Exists(Emp_Role);

The above Script Will load only Where Emp_Role=X For All fields. But i also want to load only Code =100.So for that what should i do now can any one help me on this.

9 Replies
sunny_talwar

May be this:

Data_Temp:

Load * Inline [

Emp_Role

X

];

Data:

Load ID, 

        Employee_Name,

        Emp_Role,

       Code

From..............

Where Exists(Emp_Role) and Code = 100;

subbareddykm
Creator II
Creator II
Author

If i do Like that i ll will become un-optimized load right?

sunny_talwar

Yes it will be an un-optimized load

subbareddykm
Creator II
Creator II
Author

Is there any other solution?

Why bcoz i have huge data so I don't make this un-optimized.

Anonymous
Not applicable

So the long term answer is to create a multi stage load process and load your data to a QVD file first.  Stage all of your data in QVD's and then do your high level load directly from QVD's only.

Anonymous
Not applicable

How about you create a combined field of [Emp_Role_and_Code]. 

Then do a suitable Inline load for this and a single Where Exists to get an optimised load.

maheshkuttappa
Creator II
Creator II

‌hi,

i would use below script it would be more faster.

Data_Temp

Load * Inline [

Emp_Role

X ];

Data:

Load

ID,

Employee_Name,

Emp_Role,

Code

From...

where exists(Emp_Role);

inner join (Data)

load * Inline

[ Code

100];

drop table Data_Temp;

sunny_talwar

Look at what Bill‌ has proposed. I don't know another way of doing it.

maxgro
MVP
MVP

Bill solution

or if one of the fields will exclude a lot of records you can try with a 2 step optimized exists:

load inline first field

load optimized (exists) from qvd

store in qvd

load inline second field

load optimized (exists) from last stored qvd