Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi folks,
i have a table having 14000 records and 3 columns in a table called tableserver. i created a sp as following in sql server
create procedure spc_test
as
begin
select top 1 col1,col2,col3 from tableserver
end
i tried to exec this sp through Qlik
ODBC CONNECT32 TO server;
SQL exec spc_test;
getting following error while reloading the script
ODBC read failed
SQL exec spc_test
but the same time if i query the records in qlikview, it fetching all the 14000 records
ODBC CONNECT32 TO server;
SQL select * from tableserver ;
Request you to kindly clarify the behavior and help us on this issue for using sp.
Thanks in Advance...
With Regards
Deepak Subramoniam
have you installed all the necessary driver ? check the syntax in Qlikview script editor.
share the script so that we can identify the issue
qlikvew cannot execute stored [procedures.
It can only execute any of the attached screenshot and any nested sql statement.etc...
Sorry Vikram Vangala,
i was able to execute a sp with both with and without input
create table test
(
col1 int, col2 varchar(100)
)
insert into test values (1,'a')
create procedure Qliktest
as
begin
select col1,col2 from test
end
create procedure Qliktest_inp
@col1 int
as
begin
select col1,col2 from test where col1 =@col1
end
Qlik View code
================================
ODBC CONNECT32 TO server;
SQL exec Qliktest;
output
fetched 1 record
ODBC CONNECT32 TO server;
SQL exec Qliktest_inp;
input : 1
output
fetched 1 record
the problem for me is above as mentioned in discussion. is there any timeout parameter needs to be set..??
vikramvangala: thanks for spending your valuable time on my issue, please help me further to sort out this isse.
Thanks in Advance...
With Regards
Deepak Subramoniam
try
SQL exec schema_name.database_name.spc_test;
Hello Deepak,
About calling procedures for within QlikView, if you have not achieved, you can try the way that I will mentioned below.
Step 1:
Set your script editor and it will open the databases in read and write mode.
Step 2:
Correctly write your connection string, it is ODBC or OLEDB, add, before or after the password the following content
"Mode is write"
Step 3:
Write correctly the call of Procedure that you want to call, in my example will look like this ...
"SQL call user_bi.prc.Anil('6.2016','017');"
I think this should work. Try and let me know..
- Anil
.I thought you just wanted to read the data.If yoou need to update anything back to database then try Anil Babu's solution.It would work.