Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need Help in Script Where condition

Hi,

I would like to load only list of numbers from the database, so I am manually writing every day like as

Load

AAA,

BBB,

CCC;

Sql Select

AAA,

BBB,

CCC

Where CCC IN('51',52');    

My question is I would like to give the CCC variable value numbers in excel file or in a text file.

Thanks in advance to advise ...

10 Replies
MarcoWedel

Hi,

maybe you could combine Max' solution with a preceding load to the SQL select like this:

tabTemp:

LOAD CCC

From YourExcelFile;

table1:

LOAD *

Where Exists(CCC);

SQL Select

        AAA,

        BBB,

        CCC

From YourDBTable;

DROP Table tabTemp;

or maybe with a join instead of Exists():

table1:

LOAD CCC

From YourExcelFile;

Left Join (table1)

SQL Select

        AAA,

        BBB,

        CCC

From YourDBTable;

Please not that these solutions load all CCC values from your DB, so the script run time might be longer compared to reducing the CCC values already in the select statement.

hope this helps

regards

Marco