Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
kikerodriguez10
Contributor III
Contributor III

Where clause with 2 variables.

Hi everyone!

I need to use two variables in a where clause. I try with this syntax but I did not succeed:

Let vVariable1=5;

Let vVariable2=10;

Table:

Load Field1,

         Field2,

         Field3

From Document

WHERE Field1 > $(vVariable1)  and  Field1 < $(vVariable2);



Anyone know the correct syntax for this example?



Thanks in advance!



5 Replies
vishsaggi
Champion III
Champion III

Try this

Let vVariable1=5;

Let vVariable2=10;

Table:

Load Field1,

         Field2,

         Field3

From Document

WHERE Field1 > '$(vVariable1)' and  Field1 < '$(vVariable2)';

kikerodriguez10
Contributor III
Contributor III
Author

Thanks for your help @Vishwarath Nagaraju !

I tried it but did not work, also I tried with double quote but neither work.

Any other syntax?

Thank you very much!

devarasu07
Master II
Master II

Hi,

Seems like some data format issue . can you share some mock data and expected output. that would be easy for us to check and share our suggestions. Thanks

Thanks,
Deva

vishsaggi
Champion III
Champion III

What are the values you hold in your Field1 column? Can you share some sample data to look into. ?

Clever_Anjos
Employee
Employee

It seems correct to me, unless Field1 has a different format