<?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: loop in data tables in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/loop-in-data-tables/m-p/677153#M1080192</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gerhard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;well, you have to load the Account_table first and then the App_table, and then you want to single out all the records - from the Account_table, I reckon - that do not exist in the App_table?&lt;/P&gt;&lt;P&gt;Right?`&lt;/P&gt;&lt;P&gt;Well, if you have both tables already loaded, that's easy: Just do a RESIDENT LOAD from the Account_table with a WHERE NOT EXISTS() clause referring to the ID in the App_table.&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Jul 2014 12:48:52 GMT</pubDate>
    <dc:creator>datanibbler</dc:creator>
    <dc:date>2014-07-15T12:48:52Z</dc:date>
    <item>
      <title>loop in data tables</title>
      <link>https://community.qlik.com/t5/QlikView/loop-in-data-tables/m-p/677152#M1080190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an &lt;STRONG&gt;Account_Table&lt;/STRONG&gt; and it has an &lt;EM&gt;[Appl No]&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;I have and &lt;STRONG&gt;App_Table&lt;/STRONG&gt; which also has an &lt;EM&gt;[Appl No]&lt;/EM&gt;, and a field called &lt;EM&gt;[Origin Code]&lt;/EM&gt;, with e.g. Origin 1 and Origin 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not all the records from the &lt;STRONG&gt;Account_Table&lt;/STRONG&gt; exist in the &lt;STRONG&gt;App_Table&lt;/STRONG&gt;. These are migrated accounts (I can identify them this way in the &lt;STRONG&gt;Account_Table)&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I want to give all the records that DO NOT exist in the &lt;STRONG&gt;App_Table&lt;/STRONG&gt; an &lt;EM&gt;[Origin Code]&lt;/EM&gt; of Origin 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For other reasons I have to load my &lt;STRONG&gt;Account_Table&lt;/STRONG&gt; first, and then my &lt;STRONG&gt;App_Table&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would be the best way to do this? I tried adding the &lt;EM&gt;[Origin Code]&lt;/EM&gt; field to the &lt;STRONG&gt;Account_Table &lt;/STRONG&gt;and saying if the account is migrated the &lt;EM&gt;[Origin Code]&lt;/EM&gt; should be Origin 3, but then I create a loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gerhard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2014 12:45:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/loop-in-data-tables/m-p/677152#M1080190</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2014-07-15T12:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: loop in data tables</title>
      <link>https://community.qlik.com/t5/QlikView/loop-in-data-tables/m-p/677153#M1080192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gerhard,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;well, you have to load the Account_table first and then the App_table, and then you want to single out all the records - from the Account_table, I reckon - that do not exist in the App_table?&lt;/P&gt;&lt;P&gt;Right?`&lt;/P&gt;&lt;P&gt;Well, if you have both tables already loaded, that's easy: Just do a RESIDENT LOAD from the Account_table with a WHERE NOT EXISTS() clause referring to the ID in the App_table.&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2014 12:48:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/loop-in-data-tables/m-p/677153#M1080192</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2014-07-15T12:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: loop in data tables</title>
      <link>https://community.qlik.com/t5/QlikView/loop-in-data-tables/m-p/677154#M1080194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gerhard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am a little confused. Where do you want to put the Origin 3 values if the record does not exist in the App Table? If you meant that you will create it in the Account Table, then make sure it is removed from the App Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I would try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MapOrigin:&lt;/P&gt;&lt;P&gt;Mapping LOAD [Appl No],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Origin Code]&lt;/P&gt;&lt;P&gt;FROM App_Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AccountTable:&lt;/P&gt;&lt;P&gt;LOAD [Appl No],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('MapOrigin', [Appl No], 'Origin 3') As [Origin Code],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/P&gt;&lt;P&gt;FROM Account_Table;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now load App Table, but do not load Origin Code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this do what you require?&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jul 2014 12:53:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/loop-in-data-tables/m-p/677154#M1080194</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2014-07-15T12:53:06Z</dc:date>
    </item>
  </channel>
</rss>

