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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

sql query on interger context variable

I want to write a condition with two where condition on Context integer value on tOracleInput

 

Select order_num from order_table

where id >= context.a1

and id<= context.a2;

 

Where a1 and a1 and id are all integer value.How to achieve that in tOracleInput.

Labels (2)
4 Replies
TRF
Champion II
Champion II

Try this for the condition:

"id >= " + context.a1 + " and id<= " + context.a2

Hope this helps.

Anonymous
Not applicable
Author

I tried that before :I get this error:
Invalid operation: relation "context" does not exist;
This is my full query:
"Select order_num from order_table
where id >= " + context.a1 + " and id<= " + context.a2;

And two context variable has been defined as integer. Why does it give the error
TRF
Champion II
Champion II

Very strange.
Can you share your tOracleInput settings?
TRF
Champion II
Champion II

Based on your pm, what if you remove the semicolumn at the end of the query (or if you replace it by + ";")?