Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Stored Procedure

Hi guys,

I am trying to execute a stored procedure with a variable.  I've created the variable and loaded the script. 

Load * ;

SQL EXECUTE sp_CustomerPriceList '$(vCustNo)';

After the load has completed successfully i cannot see any fields to choose when creating a table within my sheet based on the results of the stored procedure.

Has anyone seen anything like this before?  Or can offer any advice?

Thanks

14 Replies
Anonymous
Not applicable
Author

It's because we have thousands of different customers with different price lists.  When you execute the stored procedure against one customer you have 83,000 rows and this is just for that one customer!

The way i envisage this working is the user enters a customer number which is done via a Variable/Input box and then you can press a button which will execute the stored procedure against the customer which is entered into the variable.  I've ran the stored procedure in management studio and it only takes around 10 seconds to complete so this shouldn't take too long at all.

If this isn't possible then i shall just park this idea!..

Thanks for your advice anyway so far though guys

Anonymous
Not applicable
Author

Can anyone offer any further help with this or is it a no goer?

Not applicable
Author

You could store the command in a batchfile and execute the batch through a macro button, i wouldnt really advise it but it is possible. 

Anonymous
Not applicable
Author

Sounds interesting.

Any idea how? Haha

Dalton_Ruer
Support
Support

I know it's been a long time since you asked but I wanted to post here in case people searched and found this.

I just posted a document on this topic When is a Result Set not a Result Set?  and the answer is Yes Qlik would have problems if you create a temporary table inside your stored procedure, but you can use SET NOCOUNT ON in SQL Server to avoid the issue so that Qlik will be able to see the right results.