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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
g_shanbhagis1
Partner - Contributor
Partner - Contributor

Grouped Stored Procedures / Numbered Stored Procedure

Hi Team,

We need help to execute MSSQL grouped stored procedures.

In MSSQL we can have versions of stored procedure.

Procedures with same name but each version will give different output.

For more details, please see below link

https://dba.stackexchange.com/questions/24496/in-sql-server-what-is-the-purpose-of-grouping-stored-p...

to execute any stored procedure the command is

 

QLIK:

Let vLiteralParm1='1';

Let vLiteralParm2='21-02-2019';

SQL EXEC [StoredProcedureName]  '$(vLiteralParm1)', $(vNumericParm2);

This works for simple stored procedure with input parameters.

 

But to run grouped procedure the command should be with ';number'

SQL EXEC [StoredProcedureName];2  '$(vLiteralParm1)', $(vNumericParm2);

This is working in MSSQL management studio but not in Qlik.

Any one have run the grouped SP in Qlik before ?

Please help

Thanks,

Ganesh

 

 

1 Reply
Anil_Babu_Samineni

Technically this is something SQL and/or Qlik Limitation. Perhaps check this

Let vLiteralParm1='1';

Let vLiteralParm2='21-02-2019';

Table:

Load *  Where Field1= '$(vLiteralParm1)' Or Field2= '$(vNumericParm2)';

SQL EXEC [StoredProcedureName];

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful