Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Anyone have idea about sql #temp table and insert statement usability in qlik.
I have a sql query with multiple insert and #temp table, how to use this query in qlik.
Thanks,
RK
Just use the SQL keyword. The load will return no data but that is not a problem. For example
CONNECT ...
// create temp table (no data returned)
SQL
SELECT * into #temp
FROM mytable;
// do some manipulation to the temp table (no data returned)
SQL
UPDATE #temp
...
...
// Now get the data into QV
Table:
SQL SELECT * FROM #temp;
DISCONNECT; //#temp out of scope after disconnect, so the resources used are released
The #temp table remains in scope for the duration of a single database connection. Make sure that the connection has the necessary permissions to create temp tables.