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

Can not execute SQL SEVER Stored Procedure in Qv

Hi Everyone,

Anybody knows how to load data from stored procedure?

I need to load data from sql server Stored Precedure in Qlikview. But each time no data or table loaded without error message.

Connect to sql server OK. The script work fine in sql server client.

I wrote the script like this:

Capture.PNG

Below is the ending snapshot after finished reloading.

Capture1.PNG

1 Solution

Accepted Solutions
markodonovan
Specialist
Specialist

Hi Duo,

Can you check that NOCOUNT is set to ON.

Here is my stored procedure :

USE [testdb]

GO

/****** Object:  StoredProcedure [dbo].[get_test_data]    Script Date: 07/31/2015 10:55:19 ******/

SET ANSI_NULLS ON

GO

SET QUOTED_IDENTIFIER ON

GO

-- =============================================

-- Author:        <Author,,Name>

-- Create date: <Create Date,,>

-- Description:    <Description,,>

-- =============================================

ALTER PROCEDURE [dbo].[get_test_data]

AS

BEGIN

    -- SET NOCOUNT ON added to prevent extra result sets from

    -- interfering with SELECT statements.

    SET NOCOUNT ON;

    -- Insert statements for procedure here

    SELECT branch from dim_branch

    where branch is not null

END

Thanks

Mark

techstuffybooks.com

View solution in original post

30 Replies
sorrakis01
Specialist
Specialist

Hi Duo,

Table:

SQL

EXEC dbo.Store_procedure_Name '120','A';

If doesn't work look this link:

https://community.qlik.com/message/693191#693191

Regards

Anonymous
Not applicable
Author

on SQL Server you need additionally "execute" rights. normally users only get read permissions.

check that please!

markodonovan
Specialist
Specialist

Hi Duo,

Silly question.

Does the stored procedure return data when you run it from the management studio ?

Mark

techstuffybooks.com

Not applicable
Author

Yes, there are number of rows.

Not applicable
Author

Thank you.

You mean i need additional rights if i have to execute in qlikview even if i can execute it from sql server management studio already?

Actually, I can execute the script from sql server management studio without any warning or error.

sorrakis01
Specialist
Specialist

Hi,

Look at link in my post the comment of Normelio Junior.

Regards

Anonymous
Not applicable
Author

no when you can execute it from SQL Server you got the permissions and it should work as well from qlikview

I donot remember what we did when we tried to use a stored procedure (in our case we got no Advantage) but you may define in Settings "open database in read and write mode"

markodonovan
Specialist
Specialist

Hi Duo,

Are there any errors\warnings in the sql server error log ?

Thanks

Mark

techstuffybooks.com

Not applicable
Author

Yes i have check "open database in read and write mode" . Thank you.