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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to translate IN SQL STATMENT

I need to check different values from different tables. One is from a sql query another one is from an excel.

I would like to do something like that:

SELECT CarTypeId FROM CarType
WHERE (CarTypeId NOT IN
(SELECT DISTINCT CarTypeId FROM Cars)
)

But from the qlikview script ?

Is it feasable?

Thanks in advance

1 Solution

Accepted Solutions
jagannalla
Partner - Specialist III
Partner - Specialist III

Hello,

First load the field from excel sheet. Qv has Exists function which allows to check with loaded field data.Use that for sql data load viceversa..

Temp:


Load CarTypeId From ExcelData;

Main:

Load CarTypeId, 1 as CountValue

From SqlData

Where Not Exists(CarTypeId);

Drop Table Temp;

View solution in original post

1 Reply
jagannalla
Partner - Specialist III
Partner - Specialist III

Hello,

First load the field from excel sheet. Qv has Exists function which allows to check with loaded field data.Use that for sql data load viceversa..

Temp:


Load CarTypeId From ExcelData;

Main:

Load CarTypeId, 1 as CountValue

From SqlData

Where Not Exists(CarTypeId);

Drop Table Temp;