<?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: Use data from resident load in SQL query in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431225#M609335</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Won't this method still pull everything from the SQL query then apply the WHERE Exists afterwards? &lt;/P&gt;&lt;P&gt;Tbl1 is a large table that take a lot of time to query against.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Dec 2017 18:38:39 GMT</pubDate>
    <dc:creator>andrewmo</dc:creator>
    <dc:date>2017-12-05T18:38:39Z</dc:date>
    <item>
      <title>Use data from resident load in SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431222#M609332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone direct me on how to use a resident load as part of an IN statement in an SQL where clause?&lt;/P&gt;&lt;P&gt;I have a primary key that is populated in a load statement that I wan to utilize in the where statement of an sql query. &lt;/P&gt;&lt;P&gt;Here is an example of the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IDSTG:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID&amp;nbsp; &lt;/P&gt;&lt;P&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; excelsheet; //contains 500 ID values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vID = PEEK('ID','IDSTG');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DEMO:&lt;/P&gt;&lt;P&gt;LOAD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DISTINCT *;&lt;/P&gt;&lt;P&gt;SQL&lt;/P&gt;&lt;P&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID, Date, Name&lt;/P&gt;&lt;P&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tbl1&lt;/P&gt;&lt;P&gt;WHERE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID IN ('$(vID)')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to use vID like it is a temp table that can be referenced in the SQL script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 18:20:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431222#M609332</guid>
      <dc:creator>andrewmo</dc:creator>
      <dc:date>2017-12-05T18:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Use data from resident load in SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431223#M609333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use where exists for this rather than IN clause.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 18:31:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431223#M609333</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-12-05T18:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Use data from resident load in SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431224#M609334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This ways&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;IDSTG:&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;LOAD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;ID as IDloading&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; excelsheet; //contains 500 ID values&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;DEMO:&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;LOAD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DISTINCT *&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;WHERE Exists( &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;IDloading,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ID &lt;/SPAN&gt;&lt;/SPAN&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;SQL&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;SELECT&amp;nbsp;&amp;nbsp; ID, Date, Name&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM&gt;FROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tbl1;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 18:36:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431224#M609334</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-12-05T18:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Use data from resident load in SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431225#M609335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Won't this method still pull everything from the SQL query then apply the WHERE Exists afterwards? &lt;/P&gt;&lt;P&gt;Tbl1 is a large table that take a lot of time to query against.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 18:38:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431225#M609335</guid>
      <dc:creator>andrewmo</dc:creator>
      <dc:date>2017-12-05T18:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Use data from resident load in SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431226#M609336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrew&lt;/P&gt;&lt;P&gt;1 exm:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;TMP:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;[&lt;BR /&gt; ID,FIELD&lt;BR /&gt; 1,A&lt;BR /&gt; 2,C&lt;BR /&gt; 11,V&lt;BR /&gt; 34,N&lt;BR /&gt; 25,U&lt;BR /&gt; 12,P&lt;BR /&gt; 18,O&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;;&lt;BR /&gt; &lt;BR /&gt; ;&lt;BR /&gt; [SUM]: &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;LOAD&lt;/STRONG&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Concat&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;CHR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(39) &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;ID&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;CHR&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(39),',') &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: maroon;"&gt;ID&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Resident&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; TMP;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;LET&lt;/STRONG&gt; &lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;v_IN_ID&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;trim&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;('ID'));&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;DROP&lt;/STRONG&gt; &lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: blue;"&gt;Table&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; TMP, SUM;&lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style="color: blue; font-size: 9.0pt; font-family: 'Courier New';"&gt;TRACE&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; SELECT&amp;nbsp; ID, Date, Name FROM Tbl1 WHEREID IN (&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style="color: gray; font-size: 9.0pt; font-family: 'Courier New';"&gt;$(v_IN_ID)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt; ); &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;IMG alt="IN.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/185820_IN.png" style="height: 377px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 19:22:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431226#M609336</guid>
      <dc:creator>el_aprendiz111</dc:creator>
      <dc:date>2017-12-05T19:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: Use data from resident load in SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431227#M609337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That appears to do the trick. Thanks much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 20:25:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431227#M609337</guid>
      <dc:creator>andrewmo</dc:creator>
      <dc:date>2017-12-05T20:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Use data from resident load in SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431228#M609338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;NO it is also a good technic to load data from selected ids where you can load the data on the SQL tables it self.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 20:35:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431228#M609338</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-12-05T20:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use data from resident load in SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431229#M609339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It appears to be pulling everything then applying the Where exists afterwards as I can see in the Script Execution Process the number of lines fetched when executing the SQL portion is higher than the number of IDs. Also, I do not have access to write to tables in that SQL server thus is why I needed to figure out how to apply the IDs I needed only.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2017 20:39:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1431229#M609339</guid>
      <dc:creator>andrewmo</dc:creator>
      <dc:date>2017-12-05T20:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Use data from resident load in SQL query</title>
      <link>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1520686#M609340</link>
      <description>&lt;P&gt;So this solution only seems to work if the list of values in the IN Statement is less than 1000.&amp;nbsp; If you have more than 1000 values the sql errors out.&amp;nbsp; Is there anyway around this limit?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Dec 2018 18:55:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Use-data-from-resident-load-in-SQL-query/m-p/1520686#M609340</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-13T18:55:42Z</dc:date>
    </item>
  </channel>
</rss>

