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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

SQL BUILDER - How can I include a context variable in the WHERE clause

Hi:
I want to use in an sql query a value prompted in the context. (I'm using an INFORMIX database).
I've created the variable called "myvariable" . When I run the job, it prompts for a value, just as I want.
When I want to include it in my query, I type Ctrl+SpaceBar and I can select my variable from a list (it was called "context.myvariable".
The query appears so:
"SELECT * FROM mytable
WHERE column1 = context.myvariable"
The system rejects my code saying "COLUMN context IS NOT FOUND IN ANY TABLE IN THE QUERY".
Please help me to mend my syntax.
Thank you very much in advance.
Juan Carlos.
Labels (2)
21 Replies
_AnonymousUser
Specialist III
Specialist III

By the way I do know that the From is missing that is because it was very long
Anonymous
Not applicable
Author

Hi chrisBolduc,
Can you make it success if you use the value directly without variable in query?
Would you mind elaborating your case with an example with input and expected output values?
Best regards
Sabrina