Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load inline with condition based on variable

I have a simple inline script -

LOAD * INLINE [

    Name, Age

    Jon, 11

    Ash, 15

    Sam, 10

    Ashley, 5

    Carla, 3

    David, 7

];

Is there a way to load only those rows which meet a condition specified by a variable ?

Eg. LOAD ....

];

WHERE Age = myQlikViewVariable

1 Solution

Accepted Solutions
mambi
Creator III
Creator III

yes of course,

for exemple if you've already defined a variable : set vAge = 10;

then you can use it like this :

set vAge = 10;
LOAD * INLINE [
     Name, Age
     Jon, 11
     Ash, 15
     Sam, 10
     Ashley, 5
     Carla, 3
     David, 7
] Where Age >= $(vAge);

View solution in original post

2 Replies
mambi
Creator III
Creator III

yes of course,

for exemple if you've already defined a variable : set vAge = 10;

then you can use it like this :

set vAge = 10;
LOAD * INLINE [
     Name, Age
     Jon, 11
     Ash, 15
     Sam, 10
     Ashley, 5
     Carla, 3
     David, 7
] Where Age >= $(vAge);

Not applicable
Author

Yes, you can use a preloaded variable in where condition of inline load.