Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ramkrishna86
Creator II
Creator II

How to use sql #temp table and insert statement in qlik

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

1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

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.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein