<?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: Loading a Variable with an integer in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Loading-a-Variable-with-an-integer/m-p/545285#M684172</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For tblSubList, you should be able to use a WHERE clause like:&lt;/P&gt;&lt;P&gt;WHERE exists(IDFromtblCHI, IDFromtblSubList)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jan 2014 15:47:48 GMT</pubDate>
    <dc:creator>Nicole-Smith</dc:creator>
    <dc:date>2014-01-21T15:47:48Z</dc:date>
    <item>
      <title>Loading a Variable with an integer</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-a-Variable-with-an-integer/m-p/545282#M684169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my script I am loading a table 'tblSubList' but I am not interested in every record in this table, and loading every record adds time to the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Earlier in the script I have another table 'tblCHI' that contains the ID numbers for the records I am interested in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I take the minimum ID from 'tblCHI' and use this in the WHERE clause for 'tblSubList'?&amp;nbsp; Or would a Left Join be just as efficient (as there may not be matching records in 'tblSubList').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SQL Server I would do something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@MinSysID = SELECT Min(SYS_ID) FROM tblCHI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM tblSubList WHERE SYS_ID &amp;gt;= @MinSysID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can a similar thing be done in QlikView?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 15:39:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-a-Variable-with-an-integer/m-p/545282#M684169</guid>
      <dc:creator />
      <dc:date>2014-01-21T15:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a Variable with an integer</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-a-Variable-with-an-integer/m-p/545283#M684170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tmp:&lt;/P&gt;&lt;P&gt;SQL &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;SELECT Min(SYS_ID) as min FROM tblCHI&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vMin=peek('min');&lt;/P&gt;&lt;P&gt;drop table Tmp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;SQL SELECT * FROM tblSubList WHERE SYS_ID &amp;gt;= $(vMin)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 15:44:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-a-Variable-with-an-integer/m-p/545283#M684170</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2014-01-21T15:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a Variable with an integer</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-a-Variable-with-an-integer/m-p/545284#M684171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, use the keyword EXISTS, in this way you can load only existing IDs previously loaded&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 15:45:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-a-Variable-with-an-integer/m-p/545284#M684171</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2014-01-21T15:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a Variable with an integer</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-a-Variable-with-an-integer/m-p/545285#M684172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For tblSubList, you should be able to use a WHERE clause like:&lt;/P&gt;&lt;P&gt;WHERE exists(IDFromtblCHI, IDFromtblSubList)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 15:47:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-a-Variable-with-an-integer/m-p/545285#M684172</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-01-21T15:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: Loading a Variable with an integer</title>
      <link>https://community.qlik.com/t5/QlikView/Loading-a-Variable-with-an-integer/m-p/545286#M684173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello James,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Qlikview equivalent way to approach this is by using the PEEK function.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;E.g. peek(&lt;/SPAN&gt;&lt;SPAN class="Italic"&gt;fieldname [ , row [ , tablename ] ] &lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;)&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As in SQL you can put the result in a variable and the use that variable in the where clause of the tblSubList table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 15:48:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Loading-a-Variable-with-an-integer/m-p/545286#M684173</guid>
      <dc:creator>richard</dc:creator>
      <dc:date>2014-01-21T15:48:02Z</dc:date>
    </item>
  </channel>
</rss>

