<?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: Check if a field value exists within a specific table? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Check-if-a-field-value-exists-within-a-specific-table/m-p/562944#M694383</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right (if I understand you correctly), you would need to create the Alias also when you create the KeyCount table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's just a field that only exists in one table, containing the values you want to check (not 100% sure about your requirements, so maybe this is not what you really need).&lt;/P&gt;&lt;P&gt;exists() with two parameters allows to check your input field Key value (or an expression) against this different field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jul 2013 10:01:28 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2013-07-11T10:01:28Z</dc:date>
    <item>
      <title>Check if a field value exists within a specific table?</title>
      <link>https://community.qlik.com/t5/QlikView/Check-if-a-field-value-exists-within-a-specific-table/m-p/562940#M694379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm doing incremental loads and as part of that I have the usual concatenate from my qvd where Not Exists(MyField).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works fine when the field only exists in one table, but I think it's failing when I have the field in multiple tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a facts table that among other things has a CallKey field which is unique to a call. This table has joined data so the CallKey will appear in multiple rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For this reason I also have a table CallCount which has fields CallKey and Count which has one row per CallKey and a 1 in the Count field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that I'm saving both of these tables to QVDs then trying to load new/updated values afterwards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I first load old data for Facts, which includes my CallKey values, then I load old data for CallCount, but because I only want to load records not already loaded I do a where Not Exists(CallKey).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The trouble is, the CallKey does already exist, but in another table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I still load the record in my CallCount table, where the Key field already exists in another table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 09:11:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-if-a-field-value-exists-within-a-specific-table/m-p/562940#M694379</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-11T09:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a field value exists within a specific table?</title>
      <link>https://community.qlik.com/t5/QlikView/Check-if-a-field-value-exists-within-a-specific-table/m-p/562941#M694380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forgot to mention, I know I could simply take the CallCount out of the incremental loading part and calculate it once I built my Facts table completely, however the problem with that is that My facts table is very large and calculating the CallCount table from scratch ever time seems very inefficient.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 09:13:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-if-a-field-value-exists-within-a-specific-table/m-p/562941#M694380</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-11T09:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a field value exists within a specific table?</title>
      <link>https://community.qlik.com/t5/QlikView/Check-if-a-field-value-exists-within-a-specific-table/m-p/562942#M694381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can keep an alias of your key field in your CallCount Table and use exists() with 2 arguments, something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CONCATENATE (KeyCount) LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Key,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Key as Alias,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 as Count&lt;/P&gt;&lt;P&gt;FROM QVD.qvd where not exists(Alias, Key);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 09:16:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-if-a-field-value-exists-within-a-specific-table/m-p/562942#M694381</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-07-11T09:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a field value exists within a specific table?</title>
      <link>https://community.qlik.com/t5/QlikView/Check-if-a-field-value-exists-within-a-specific-table/m-p/562943#M694382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure I understand correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would I need to add the alias in when I create the table from the database too?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as I can tell that will look for the value in the field Key, in the field Alias, but the KeyCount table won't have that Alias field unless I create it when I load from the DB first.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 09:56:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-if-a-field-value-exists-within-a-specific-table/m-p/562943#M694382</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-11T09:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a field value exists within a specific table?</title>
      <link>https://community.qlik.com/t5/QlikView/Check-if-a-field-value-exists-within-a-specific-table/m-p/562944#M694383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right (if I understand you correctly), you would need to create the Alias also when you create the KeyCount table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's just a field that only exists in one table, containing the values you want to check (not 100% sure about your requirements, so maybe this is not what you really need).&lt;/P&gt;&lt;P&gt;exists() with two parameters allows to check your input field Key value (or an expression) against this different field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 10:01:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-if-a-field-value-exists-within-a-specific-table/m-p/562944#M694383</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-07-11T10:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a field value exists within a specific table?</title>
      <link>https://community.qlik.com/t5/QlikView/Check-if-a-field-value-exists-within-a-specific-table/m-p/562945#M694384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great, thanks for the extra explanation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 10:03:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-if-a-field-value-exists-within-a-specific-table/m-p/562945#M694384</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-11T10:03:09Z</dc:date>
    </item>
  </channel>
</rss>

