Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Executing Stored Procedure

Hi All,

I have attached the sample of Stored procedure. Could you please tell me how to execute that SP in Qlik?

Thanks

7 Replies
Not applicable
Author

To execute SQL stored procs in QV load script you will use SQL EXEC.... for example  SQL EXEC ProcedureName

Not applicable
Author

Hi,

Thanks for your reply. I know that I need to use SQL EXEC. But I am struggling to add Parameters and Variables that are in my script. Please see the attached in my first post above. In the SP there are 3 parameters and almost 11 variables in there.

Could you please tell me how to add those parameters and variables in qlikview?

Thanks

Not applicable
Author

Can anyone help me on this?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

The SQL EXEC statement is a SQL statement. This statement including any (optional) parameters is passed as-is to the Database engine. Your RDBMS documentation should contain information on how to pass additional info to the Stored Procedure.

For example, MS SQL Server accepts a statement like:

SQL EXEC [StoredProcedureName] 'LiteralParm1', '$(vLiteralParm2)', $(vNumericParm3);

$-sign substitution is used to make sure the placeholders are replaced with real values and under control of QlikView script. Variables can be used by first declaring them. See also here: SQL Stored Procedure into QlikView

Best,

Peter

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Note that I came to the highly enlightening post by Johannes Sunden by doing a 5-minute search of the community. You should try it.

Best,

Peter