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

stored procedure with params

Hi

I have a SQL stored proc which has three parameters that are user driven. What is the best way to send params to the stored procedure by the user?

Thanks

5 Replies
vikasmahajan

PFA Sample.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Not applicable
Author

hi

No example

maxgro
MVP
MVP

you can define an input box, let the user set the 3 variables in input box and then reload data using the 3 input box variables as parameter

example of Qlik script (just one parameter, add the other 2)

//set var = '%AAA%';

T:

load *;

sql exec sp_test '$(var)';

Example of Sql stored proc

CREATE PROCEDURE sp_test

  @p_banca varchar(10)

AS

BEGIN

  SET NOCOUNT ON;

  SELECT * from d001_banche where des_banca like @p_banca;

END

GO

rustyfishbones
Master II
Master II

Hi,

The user can simply apply the same parameters in Qlikview, so I created 3 Params in SQL Server

called

  @Shipper

  @OrderNo

  @OrdAmount

And how it would look in Qlikview

ODBC CONNECT TO Extreme;

SQL EXECUTE dbo.spUPS

  @Shipper = 'UPS',

  @OrderNo = 1200,

  @OrdAmount = 10000