<?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 How to compare field from one table with another? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-compare-field-from-one-table-with-another/m-p/469210#M1152506</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 one table loaded from an SQL database and one table loaded from an Excel sheet.&lt;/P&gt;&lt;P&gt;The structure is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13639427201679649" jivemacro_uid="_13639427201679649"&gt;&lt;P&gt;Sheet1:&lt;/P&gt;&lt;P&gt;LOAD SMV,&lt;/P&gt;&lt;P&gt;Description,&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is [Sheet]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD "STAFF_NR"&lt;/P&gt;&lt;P&gt;"JOB_DESC",&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;SQL SELECT * FROM Table1;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Table1 I want to add a new field called "VER", it should compare JOB_DESC from Table1 with Description From Sheet1. When the condition is true, a "1" must be returned, otherwise "0".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In table1 I should add the following statement in Table1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13639469927335959" jivemacro_uid="_13639469927335959"&gt;&lt;P&gt;IF(JOB_DESC = Description,'1','0') as "VER"&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I make sure that the field Description is known within Table1?&lt;/P&gt;&lt;P&gt;Is it by the use of resident?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Mar 2013 10:09:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-03-22T10:09:58Z</dc:date>
    <item>
      <title>How to compare field from one table with another?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-field-from-one-table-with-another/m-p/469210#M1152506</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 one table loaded from an SQL database and one table loaded from an Excel sheet.&lt;/P&gt;&lt;P&gt;The structure is as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13639427201679649" jivemacro_uid="_13639427201679649"&gt;&lt;P&gt;Sheet1:&lt;/P&gt;&lt;P&gt;LOAD SMV,&lt;/P&gt;&lt;P&gt;Description,&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is [Sheet]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table1:&lt;/P&gt;&lt;P&gt;LOAD "STAFF_NR"&lt;/P&gt;&lt;P&gt;"JOB_DESC",&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;SQL SELECT * FROM Table1;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Table1 I want to add a new field called "VER", it should compare JOB_DESC from Table1 with Description From Sheet1. When the condition is true, a "1" must be returned, otherwise "0".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In table1 I should add the following statement in Table1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13639469927335959" jivemacro_uid="_13639469927335959"&gt;&lt;P&gt;IF(JOB_DESC = Description,'1','0') as "VER"&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I make sure that the field Description is known within Table1?&lt;/P&gt;&lt;P&gt;Is it by the use of resident?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 10:09:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-field-from-one-table-with-another/m-p/469210#M1152506</guid>
      <dc:creator />
      <dc:date>2013-03-22T10:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare field from one table with another?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-compare-field-from-one-table-with-another/m-p/469211#M1152507</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;CODE class="jive-code"&gt;Sheet1:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; LOAD SMV,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; Description,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ..&lt;BR /&gt;&amp;nbsp;&amp;nbsp; FROM&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;C&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; (ooxml, embedded labels, table is [Sheet]);&lt;BR /&gt;&lt;/C&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&amp;nbsp;&amp;nbsp; Left join&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; LOAD &lt;/CODE&gt;&lt;CODE class="jive-code"&gt;"JOB_DESC" as Description,&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;CODE class="jive-code"&gt;"JOB_DESC";&lt;/CODE&gt;&amp;nbsp; &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&amp;nbsp;&amp;nbsp; SQL SELECT * FROM Table1;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&amp;nbsp;&amp;nbsp; NewSheet:&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&amp;nbsp;&amp;nbsp; Load *,&lt;CODE class="jive-code"&gt;IF(JOB_DESC = Description,'1','0') as "VER" resident Sheet1;&lt;/CODE&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&lt;CODE class="jive-code"&gt;&lt;/CODE&gt;&lt;/CODE&gt; &lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&lt;CODE class="jive-code"&gt;&amp;nbsp;&amp;nbsp; Drop table Sheet1;&amp;nbsp; &lt;/CODE&gt;Regards,&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kaushik Solanki&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 10:21:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-compare-field-from-one-table-with-another/m-p/469211#M1152507</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2013-03-22T10:21:42Z</dc:date>
    </item>
  </channel>
</rss>

