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

Announcements
Mastering Change Data Capture: Read Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

HOW TO EXECUTE A STORE PROCEDURES?

HI everyone good morning raza;

I have a store procedure in SQL SERVER i need to execute this store from Qlik View i don't know the correctly sintaxis

jus i found this example but how do i can do for a store procedures? can you help!!!???

Regards!!!

EXECUTE

cmd.exe /C C:\Export-Email-Automation\TriggerMacro.bat;

EXIT SCRIPT;

1 Solution

Accepted Solutions
calvindk
Creator III
Creator III

You would of course need execute permission on the SQL server. Talk to your DBA about getting execute rights.

Depending on what this sproc does, you probably want some return.

So after the sproc is finished maybe something like

SprocData:

Select *

From SQLSprocDataTable;

View solution in original post

7 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Table1:

sql exec sp_myprocedurename;

Or maybe something more complex if you need to pass parameters:

Table1:

sql

declare @myvar1 int

execute sp_myprocedurename 123, 2013, @myvar1 output

select @myvar1 as myresult;


talk is cheap, supply exceeds demand
Not applicable
Author

the store doesn't have parameters:

the sintaxis i read this way;



ODBC CONNECT TO mgtmexbaan6 (XUserId is PeCUMcRNTLbIXcVK, XPassword is KAJINZVMBDZcJ);

EXECUTE dbo.rmmMtyBom010Fill;

But appear an message:

Execute.jpg

calvindk
Creator III
Creator III

It looks like you are trying to execute it in qlikview and not on the SQL Server.

Try the SQL keyword.

Like this:

ODBC CONNECT TO mgtmexbaan6 (XUserId is PeCUMcRNTLbIXcVK, XPassword is KAJINZVMBDZcJ);


SQL EXECUTE dbo.rmmMtyBom010Fill;

Not applicable
Author

ok i was trying just now appear a message but about permission to execute the store i will notify you when i have the permission

thanks for your help !!!

calvindk
Creator III
Creator III

You would of course need execute permission on the SQL server. Talk to your DBA about getting execute rights.

Depending on what this sproc does, you probably want some return.

So after the sproc is finished maybe something like

SprocData:

Select *

From SQLSprocDataTable;

Not applicable
Author

The sintaxis is with EXECUTE or EXEC??? because i understand that in Qlik View EXECUTE is a reserved word.

mmm...but Now i have permission on SQL for execute stores   and

i executed the Stores inside of Qlik View and work it.

thanks for your helps and Regards!!!

calvindk
Creator III
Creator III

I am glad it worked.

You can mark helpful and correct answers. This is a general thing that will allow others looking for the same question or answer to find results faster.

Best wishes