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: 
Not applicable

Parameters of an SQL Query in QLIKVIEW

Hi community,

I wrote a query ORACLE that requires parameters.

I'd like to load the data set obtained in this query in a table Qlikview.

I do not know how we pass parameters to a query within QlikView.

Thank you for your help.


2 Replies
Not applicable
Author

Hi,

If you pass parameters in reload script, you can use the sintax "INPUT".

After you need to read this values into a variables using PEEK function.

In your query, just use the variables.

See example.

Table1:
Load
Input('Enter value', 'Input box') as v,
Recno () as r
autogenerate 3;

LET vParam1 = PEEK('v', 0, 'Table1');
LET vParam2 = PEEK('v', 1, 'Table1');
LET vParam3 = PEEK('v', 2, 'Table1');

........

Table4:
LOAD F1 AS TMP2
RESIDENT Table2
WHERE F1 <> '$(vParam1)'
and F1 <> '$(vParam2)'
and F1 <> '$(vParam3)';

In your SQL (Oracle) script you can use $(vParam1) to number OR '$(vParam1)' to text

Not applicable
Author

OK thank you Correa, i will try later