Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
mokitsu61
Creator
Creator

Can QV use variables in [SQL SELECT] ?

Hi,

Can QV use variables in [SQL SELECT]?

e.g.

SET vCondition = '';

SQL SELECT *

FROM TableName

WHERE A = $(vCondition);

1 Solution

Accepted Solutions
mayankraoka
Specialist
Specialist

You can also use below:

Let vCondition = '';

SQL SELECT *

FROM TableName

WHERE A = '$(vCondition)'

Regards,

Mayank

View solution in original post

2 Replies
mayankraoka
Specialist
Specialist

You can also use below:

Let vCondition = '';

SQL SELECT *

FROM TableName

WHERE A = '$(vCondition)'

Regards,

Mayank

brooksc57
Creator
Creator

you wouldn't believe how hard this was to find.  I kept searching preceding load with sql select variable and similar things to that...thanks so much for your post.  it will greatly reduce the punishment of returning too many useless records!!!