<?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 table1 MINUS table2 sql in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/table1-MINUS-table2-sql/m-p/168911#M39897</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! I'm woking with two tables, table1 and table2 like the following ones:&lt;/P&gt;&lt;P&gt;&lt;I&gt;Expediente:&lt;/I&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;/I&gt;&lt;B&gt;LOAD&lt;/B&gt; "No_" &lt;B&gt;as&lt;/B&gt; nexpediente ; &lt;B&gt;SQL&lt;/B&gt; &lt;B&gt;SELECT&lt;/B&gt; "Cód_ Expediente" &lt;B&gt;FROM&lt;/B&gt; table1;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-style: italic"&gt;Incidencia:&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;/I&gt;&lt;B&gt;LOAD&lt;/B&gt; "Cód_ Expediente" &lt;B&gt;as&lt;/B&gt; nexpediente, "No_ Incidencia" &lt;B&gt;as&lt;/B&gt; nincidencia; &lt;B&gt;SQL&lt;/B&gt; &lt;B&gt;SELECT&lt;/B&gt; "Cód_ Expediente", "No_ Incidencia" &lt;B&gt;FROM&lt;/B&gt; table2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just want to take every single nexpediente from table1 which doens't exists on table2.&lt;/P&gt;&lt;P&gt;I've tried with a simple sql sentece like:&lt;/P&gt;&lt;P&gt;select exp from table1;&lt;/P&gt;&lt;P&gt;MINUS&lt;/P&gt;&lt;P&gt;select exp from table 2;&lt;/P&gt;&lt;P&gt;Following this sentence qlikview does not show up any error but it's like it doesn't recognize MINUS since the results are not the expected.&lt;/P&gt;&lt;P&gt;I also tried with another simple sentece of sql like:&lt;/P&gt;&lt;P&gt;select exp from table 1&lt;/P&gt;&lt;P&gt;where exp not in (select exp from table2);&lt;/P&gt;&lt;P&gt;But it doesn't work either....&lt;/P&gt;&lt;P&gt;I've also seen this post (&lt;A href="https://community.qlik.com/forums/p/27092/103702.aspx#103702"&gt;http://community.qlik.com/forums/p/27092/103702.aspx#103702&lt;/A&gt;) at the forum about this same question, but I've tried what they explain and it doesn't work either...&lt;/P&gt;&lt;P&gt;if someone could help me please...thx!&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 May 2010 10:56:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-05-28T10:56:10Z</dc:date>
    <item>
      <title>table1 MINUS table2 sql</title>
      <link>https://community.qlik.com/t5/QlikView/table1-MINUS-table2-sql/m-p/168911#M39897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! I'm woking with two tables, table1 and table2 like the following ones:&lt;/P&gt;&lt;P&gt;&lt;I&gt;Expediente:&lt;/I&gt;&lt;/P&gt;&lt;P style="font-style: italic"&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;/I&gt;&lt;B&gt;LOAD&lt;/B&gt; "No_" &lt;B&gt;as&lt;/B&gt; nexpediente ; &lt;B&gt;SQL&lt;/B&gt; &lt;B&gt;SELECT&lt;/B&gt; "Cód_ Expediente" &lt;B&gt;FROM&lt;/B&gt; table1;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="font-style: italic"&gt;Incidencia:&lt;/P&gt;&lt;P&gt;&lt;I&gt;&lt;/I&gt;&lt;B&gt;LOAD&lt;/B&gt; "Cód_ Expediente" &lt;B&gt;as&lt;/B&gt; nexpediente, "No_ Incidencia" &lt;B&gt;as&lt;/B&gt; nincidencia; &lt;B&gt;SQL&lt;/B&gt; &lt;B&gt;SELECT&lt;/B&gt; "Cód_ Expediente", "No_ Incidencia" &lt;B&gt;FROM&lt;/B&gt; table2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just want to take every single nexpediente from table1 which doens't exists on table2.&lt;/P&gt;&lt;P&gt;I've tried with a simple sql sentece like:&lt;/P&gt;&lt;P&gt;select exp from table1;&lt;/P&gt;&lt;P&gt;MINUS&lt;/P&gt;&lt;P&gt;select exp from table 2;&lt;/P&gt;&lt;P&gt;Following this sentence qlikview does not show up any error but it's like it doesn't recognize MINUS since the results are not the expected.&lt;/P&gt;&lt;P&gt;I also tried with another simple sentece of sql like:&lt;/P&gt;&lt;P&gt;select exp from table 1&lt;/P&gt;&lt;P&gt;where exp not in (select exp from table2);&lt;/P&gt;&lt;P&gt;But it doesn't work either....&lt;/P&gt;&lt;P&gt;I've also seen this post (&lt;A href="https://community.qlik.com/forums/p/27092/103702.aspx#103702"&gt;http://community.qlik.com/forums/p/27092/103702.aspx#103702&lt;/A&gt;) at the forum about this same question, but I've tried what they explain and it doesn't work either...&lt;/P&gt;&lt;P&gt;if someone could help me please...thx!&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 10:56:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/table1-MINUS-table2-sql/m-p/168911#M39897</guid>
      <dc:creator />
      <dc:date>2010-05-28T10:56:10Z</dc:date>
    </item>
    <item>
      <title>table1 MINUS table2 sql</title>
      <link>https://community.qlik.com/t5/QlikView/table1-MINUS-table2-sql/m-p/168912#M39898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;The minus is not known to QV, you would need to do it in the SQL query assuming your DB has this option. If not change the loading of your data:&lt;/P&gt;&lt;P&gt;Within QV load first table 2, then on loading table 1 check with exists() that you do not want it. Drop table 2 at the end.&lt;/P&gt;&lt;P&gt;Look at the exists function in book 1 page 414&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Juerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 15:44:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/table1-MINUS-table2-sql/m-p/168912#M39898</guid>
      <dc:creator />
      <dc:date>2010-05-28T15:44:03Z</dc:date>
    </item>
  </channel>
</rss>

