<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Creating and Dropping temp tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-and-Dropping-temp-tables/m-p/762051#M661714</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My previous comment is the most straight-forward solution based on what you provided...however, below will provide some explanation for how to perform the load from temp table approach you originally outlined using qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You were definitely in the right direction from a logic perspective....just a few areas related to syntax were off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you load data in qlikview using the LOAD or SQL Select statements the table resides in the qlikview app memory. To access the table later in the script (for any number of potential reasons), you must use&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD...RESIDENT &amp;lt;tablename&amp;gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// use load statement to create temp table 1 from source qlikview data file (i.e. qvd)&lt;/P&gt;&lt;P&gt;TempTable1:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; field1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; field2,&lt;/P&gt;&lt;P&gt;&amp;nbsp; field3&lt;/P&gt;&lt;P&gt;from source.qvd(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// use sql select statement to create temp table 2 and then &lt;/P&gt;&lt;P&gt;// left join to temp table 1 on TempTable1.field1 = TempTable2.sql_field1 by aliasing the field names to be the same&lt;/P&gt;&lt;P&gt;left join (TempTable1)&lt;/P&gt;&lt;P&gt;TempTable2:&lt;/P&gt;&lt;P&gt;SQL Select&lt;/P&gt;&lt;P&gt;&amp;nbsp; sql_field1 as field1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; sql_field2,&lt;/P&gt;&lt;P&gt;&amp;nbsp; sql_field3&lt;/P&gt;&lt;P&gt;from dbo.TempTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// use load..resident statement to reload temp table 1 as a new table called Table1&lt;/P&gt;&lt;P&gt;// also alias field name to illustrate simple example of reloading an existing "temp" table&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; field1 as Field1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; field2 as Field2,&lt;/P&gt;&lt;P&gt;&amp;nbsp; field3 as Field3,&lt;/P&gt;&lt;P&gt;&amp;nbsp; sql_field2 as SQL_Field2,&lt;/P&gt;&lt;P&gt;&amp;nbsp; sql_field3 as SQL_Field3&lt;/P&gt;&lt;P&gt;RESIDENT&lt;/P&gt;&lt;P&gt;TempTable1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// remove temp table 1 from qlikview memory as it is no longer needed&lt;/P&gt;&lt;P&gt;drop table TempTable1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Feb 2015 20:30:29 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-02-06T20:30:29Z</dc:date>
    <item>
      <title>Creating and Dropping temp tables</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-and-Dropping-temp-tables/m-p/762047#M661710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello, Qlikview group. I have been an acive reader of this community but just signed up as I am hoping for help with SQL to Qlikview script. I have taken a developer/designer class several months ago but until now have not applied the knowledge until now...&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Question:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I wrote a SQL query and tried to copy and paste this into Qlikview but I am getting an error. Can someone take a look at&amp;nbsp; the script and tell me where I went wrong and maybe give me some pointer for the future, thanks...&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hopefully I am somewhat close &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;ODBC&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;CONNECT32&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TO&lt;SPAN style="color: #575757;"&gt; xxxxxx&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; TEMPTEST:&lt;BR /&gt; USE AA&lt;BR /&gt; SELECT TOP 1000 &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;[AA]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[mktId]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[effDt]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[termDt]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[termReasonCd]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[uniqueNbr]&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; FROM [Ntwk];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; TEMPTEST2:&lt;BR /&gt; USE AA&lt;BR /&gt; SELECT TOP 1000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;[AA],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;[BB]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt; FROM [NtwkMst] ;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; USE AA&lt;BR /&gt; SELECT TOP 1000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [effDt]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[termDt]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[termReasonCd]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[AA]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;,[BB]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; FROM TEMPTEST2&lt;BR /&gt; INNER JOIN TEMPTEST ON TEMPTEST2.AA = TEMPTEST.AA;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;DROP&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; TEMPTEST;&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;DROP&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; TEMPTEST2 &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 19:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-and-Dropping-temp-tables/m-p/762047#M661710</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-06T19:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and Dropping temp tables</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-and-Dropping-temp-tables/m-p/762048#M661711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;and the error is?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this (remove use..., if needed put the db before the table, move tempest)&lt;/P&gt;&lt;P&gt;and let we know&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;ODBC &lt;STRONG style="font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;CONNECT32&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;TO&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10.6666688919067px; font-family: inherit; color: #575757;"&gt; xxxxxx;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="color: #3d3d3d; font-style: inherit; font-size: 10.6666669845581px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;TEMPTEST:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 8pt; font-family: inherit; color: #0000ff;"&gt;SQL&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;&lt;BR /&gt;SELECT TOP 1000&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 8pt; font-family: inherit;"&gt;[AA]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[mktId]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[effDt]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[termDt]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[termReasonCd]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[uniqueNbr]&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;FROM [Ntwk];&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 20:01:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-and-Dropping-temp-tables/m-p/762048#M661711</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2015-02-06T20:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and Dropping temp tables</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-and-Dropping-temp-tables/m-p/762049#M661712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;modify your script to look as written below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;ODBC CONNECT32&lt;/SPAN&gt; TO xxxxxx&lt;/P&gt;&lt;P&gt;TEMPTEST:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;SQL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966;"&gt;//USE AA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;SELECT TOP 1000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [AA]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[mktId]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[effDt]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[termDt]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[termReasonCd]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,[uniqueNbr]&lt;/P&gt;&lt;P&gt;FROM [Ntwk];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;inner join&lt;/SPAN&gt;(TEMPTEST)&lt;/P&gt;&lt;P&gt;TEMPTEST2:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3366ff;"&gt;SQL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966;"&gt;//USE AA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;SELECT TOP 1000 &lt;/P&gt;&lt;P&gt;&amp;nbsp; [AA],&lt;/P&gt;&lt;P&gt;&amp;nbsp; [BB]&lt;/P&gt;&lt;P&gt;FROM [NtwkMst];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966;"&gt;//DROP TABLE TEMPTEST;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966;"&gt;//DROP TABLE TEMPTEST2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966;"&gt;&lt;SPAN style="color: #3366ff;"&gt;DROP FIELDS&lt;/SPAN&gt; &lt;SPAN style="color: #ff0000;"&gt;[mktId], [uniqueNbr]&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 20:08:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-and-Dropping-temp-tables/m-p/762049#M661712</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-06T20:08:13Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and Dropping temp tables</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-and-Dropping-temp-tables/m-p/762050#M661713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;@autopilot - Your solution worked, Now it's about understamding the difference between Qlikview and SQl syntax. Thanks!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 20:25:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-and-Dropping-temp-tables/m-p/762050#M661713</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-06T20:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and Dropping temp tables</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-and-Dropping-temp-tables/m-p/762051#M661714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My previous comment is the most straight-forward solution based on what you provided...however, below will provide some explanation for how to perform the load from temp table approach you originally outlined using qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You were definitely in the right direction from a logic perspective....just a few areas related to syntax were off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you load data in qlikview using the LOAD or SQL Select statements the table resides in the qlikview app memory. To access the table later in the script (for any number of potential reasons), you must use&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD...RESIDENT &amp;lt;tablename&amp;gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// use load statement to create temp table 1 from source qlikview data file (i.e. qvd)&lt;/P&gt;&lt;P&gt;TempTable1:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; field1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; field2,&lt;/P&gt;&lt;P&gt;&amp;nbsp; field3&lt;/P&gt;&lt;P&gt;from source.qvd(qvd);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// use sql select statement to create temp table 2 and then &lt;/P&gt;&lt;P&gt;// left join to temp table 1 on TempTable1.field1 = TempTable2.sql_field1 by aliasing the field names to be the same&lt;/P&gt;&lt;P&gt;left join (TempTable1)&lt;/P&gt;&lt;P&gt;TempTable2:&lt;/P&gt;&lt;P&gt;SQL Select&lt;/P&gt;&lt;P&gt;&amp;nbsp; sql_field1 as field1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; sql_field2,&lt;/P&gt;&lt;P&gt;&amp;nbsp; sql_field3&lt;/P&gt;&lt;P&gt;from dbo.TempTable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// use load..resident statement to reload temp table 1 as a new table called Table1&lt;/P&gt;&lt;P&gt;// also alias field name to illustrate simple example of reloading an existing "temp" table&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; field1 as Field1,&lt;/P&gt;&lt;P&gt;&amp;nbsp; field2 as Field2,&lt;/P&gt;&lt;P&gt;&amp;nbsp; field3 as Field3,&lt;/P&gt;&lt;P&gt;&amp;nbsp; sql_field2 as SQL_Field2,&lt;/P&gt;&lt;P&gt;&amp;nbsp; sql_field3 as SQL_Field3&lt;/P&gt;&lt;P&gt;RESIDENT&lt;/P&gt;&lt;P&gt;TempTable1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// remove temp table 1 from qlikview memory as it is no longer needed&lt;/P&gt;&lt;P&gt;drop table TempTable1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 20:30:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-and-Dropping-temp-tables/m-p/762051#M661714</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-06T20:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Creating and Dropping temp tables</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-and-Dropping-temp-tables/m-p/762052#M661715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wanted to provide the solution and then take time to write the explanation....which I added in a reply a minute ago.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know if that doesn't make sense. For whatever reason I can't seem to get the community editor to paste the text with the colors for load script so you may want to copy paste into a qv app for better readability.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Feb 2015 20:34:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-and-Dropping-temp-tables/m-p/762052#M661715</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-02-06T20:34:59Z</dc:date>
    </item>
  </channel>
</rss>

