<?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>question Re: How to use NOT IN query in HQL in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-NOT-IN-query-in-HQL/m-p/198115#M74041</link>
    <description>&lt;P&gt;I guess you are using HIVE &amp;gt; 0.13, before i am not sure if IN/NOT IN is implemented. But even then, there is this limitation:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;IN/NOT IN subqueries may only select a single column.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So you might try to append the values into one result column, or you try a left join with a condition like TBL2.COL1 is null&lt;/P&gt;</description>
    <pubDate>Tue, 30 Jan 2018 20:13:20 GMT</pubDate>
    <dc:creator>arald</dc:creator>
    <dc:date>2018-01-30T20:13:20Z</dc:date>
    <item>
      <title>How to use NOT IN query in HQL</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-NOT-IN-query-in-HQL/m-p/198114#M74040</link>
      <description>&lt;P&gt;I want to use NOT IN query  in HIVE. like this&lt;/P&gt;&lt;PRE&gt;INSERT INTO TBL2 
SELECT 
   t1.*
FROM
   tbl1 t1
WHERE
  (COl1,COl2,COl3,COl4)
NOT IN
  (
    SELECT 
     COl1,COl2,COl3,COl4
    FROM
     TBL2
) ;
&lt;/PRE&gt;&lt;P&gt;TBL1 is a daily processing data table.TBL2 is a Storage table.&lt;/P&gt;&lt;P&gt;TBL1 and TBL2 are same format tables.&lt;/P&gt;&lt;P&gt;I want to load data that does not exist in TBL 2 to TBL 2 in the daily processing data (TBL1).&lt;/P&gt;&lt;P&gt;How to implement this in hive?&lt;/P&gt;&lt;P&gt; regards.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 17:59:14 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-NOT-IN-query-in-HQL/m-p/198114#M74040</guid>
      <dc:creator>tomoya_yoshida</dc:creator>
      <dc:date>2018-01-30T17:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use NOT IN query in HQL</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-NOT-IN-query-in-HQL/m-p/198115#M74041</link>
      <description>&lt;P&gt;I guess you are using HIVE &amp;gt; 0.13, before i am not sure if IN/NOT IN is implemented. But even then, there is this limitation:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;IN/NOT IN subqueries may only select a single column.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So you might try to append the values into one result column, or you try a left join with a condition like TBL2.COL1 is null&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 20:13:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-use-NOT-IN-query-in-HQL/m-p/198115#M74041</guid>
      <dc:creator>arald</dc:creator>
      <dc:date>2018-01-30T20:13:20Z</dc:date>
    </item>
  </channel>
</rss>

