Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I have an SQL Server script that is briefly something as following:
Declare someting ...
TABLE #tempTable
......
DECLARE
db_cursor CURSOR
FOR
select.....
.....
FETCH NEXT FROM db_cursor INTO .....
WHILE
@@FETCH_STATUS = 0
BEGIN
insert
into #tempTable....
END
......
It is working well in SQL Server.
When it comes to executing it in QV, I have tried to put a "sql" expression at the beginning and ";" at the and of the QV script. QV does not realize it. For info, I dont have a permission to create a stored procedure in the database.
Any solution? Thanks in advance.
It is an old post I konw but I am curious if you figured this out? Has anyone used cursors in qlikview scripts?
putting any complicated SQL inside an exec usually does the trick...
exec (' T-SQL ')
Don't forget to double any quotes inside the script.