Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to use a sql server stored procedure in qlikview 10.
My procedure is something like this:
create proc sp_test
as
select a,b,c into #tmp from xxxx
select x,y,z,b from table join #tmp on #tmp.a=table.y
And I call stored procedure as
SQL Exec sp_test;
Every time trying to reload this script causes crash. There is no error, no message, just crash.
If i remove the temp table part of stored procedure as this:
create proc sp_test
as
select x,y,z from table
Then everything works fine.
Is there limitation for qlikview that i cannot use temp tables in my procedures? I tried almost everything and i couldn't fine a solution except not using temp tables.
Can you help me about this problem?
Thank you...
The credential you are using to connect to the SQL has rights to create a temp table in the database?
Yes, my user has system admin rights.
You're connecting to the SQL Server via ODBC or OLEDB?
OLEDB
Can you revise your store procedure and make it a SQL?
load *
sql select
a,b,c,
x,y,z,b from table xxx join table on xxx.a=table.y
then you can create your own table or qvd?
It was just an example. My sp is more complicated than that. It first fill sales into to a temp table and then it uses a lot of subqueries from this table.
Hi yalco,
maybe if you change the way you create the temp table. Instead, use a table variable:
DECLARE @TibetanYaks TABLE (
YakID int,
YakName char(30) )
INSERT INTO @TibetanYaks (YakID, YakName)
SELECT YakID, YakName
FROM dbo.Yaks
WHERE YakType = 'Tibetan'
SELECT *
FROM @TibetanYaks
I took the sample above from http://www.sqlteam.com/article/temporary-tables
It says that:
Hope this helps
Fernando