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

SQL temporary tables (phisical, local and global) does not return data

Hi everyone.

Does anyone knows a workaround to make this query to return data to QV? It works when running on SQL, but returns no data from QV load script.

Hints

1) Creating SP is not a solution due SQL permission/restrictions

2) SQL and connection is fine. It works when query does not create temp tables (phisical, #local or ##global ones).

Thanks in advance

test:

LOAD *;

SQL

select top 5 *

into ##tmp

from <table> with(nolock)

select * from ##tmp;

14 Replies
vishsaggi
Champion III
Champion III

Strange. It worked for me. Can you send us your actual script you are trying to use?

Anonymous
Not applicable
Author

Sure. Here it is

Anonymous
Not applicable
Author

Sorry, same result. Weird!

vishsaggi
Champion III
Champion III

Try this exact code? Use your correct usrname and password though.

OLEDB CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=True;User ID=<id>;Initial Catalog=<catalog>;Data Source=<dc>;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=<wid>;Use Encryption for Data=False;Tag with column collation when possible=False] (XPassword is <pwd>);

SQL

SELECT TOP 100 fechaalta, fechabaja

INTO ##temp

FROM dw_suscripciones with(nolock);

select * from ##temp;

sasiparupudi1
Master III
Master III

Pl Try this

SQL

SELECT x,y

INTO ##temp

FROM tab;

sql select x,yfrom ##temp

Drop table ##temp;