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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
jvelasqu3
Contributor
Contributor

Use Where Exists

I would like to use the "Where exists" function, but the field is in text, but when I declare the variable of the values ​​that I need to be loaded, they are in numbers. When I load the script, it doesn't leak information

The script is the following:

 

CD:
LOAD * INLINE [
Centro
8001
8003
8004];


Stock:
LOAD

Centro,
Stock_und
FROM [lib://QLIK/Stock.qvd](qvd)
where Exists(Centro);

 

 

Labels (3)
2 Replies
Chanty4u
MVP
MVP

Try this 

SET vCentro = '8001', '8003', '8004';

CD:

LOAD * INLINE [

Centro

'8001'

'8003'

'8004'

];

 

Stock:

LOAD

    Centro,

    Stock_und

FROM [lib://QLIK/Stock.qvd](qvd)

WHERE Exists(Centro, 'CD');

Kushal_Chawda
MVP
MVP

@jvelasqu3  you can convert your declared values in text to match with actual field format

CD:
LOAD text(Centro) as Centro;
LOAD * INLINE [
Centro
8001
8003
8004];

Stock:
LOAD
Centro,
Stock_und
FROM [lib://QLIK/Stock.qvd](qvd)
where Exists(Centro);