<?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 multiple columns in where clause not working in HIVE in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/multiple-columns-in-where-clause-not-working-in-HIVE/m-p/48373#M48257</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="The error" style="width: 600px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/2440i15E520B2AF6AD784/image-size/large?v=v2&amp;amp;px=999" role="button" title="query_result_snip2.PNG" alt="The error" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;The error&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="The query" style="width: 600px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/2439i9E4C1C2D3475D1D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="query_snip1.PNG" alt="The query" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;The query&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 10:50:22 GMT</pubDate>
    <dc:creator>Saransh</dc:creator>
    <dc:date>2022-09-16T10:50:22Z</dc:date>
    <item>
      <title>multiple columns in where clause not working in HIVE</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/multiple-columns-in-where-clause-not-working-in-HIVE/m-p/48373#M48257</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="The error" style="width: 600px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/2440i15E520B2AF6AD784/image-size/large?v=v2&amp;amp;px=999" role="button" title="query_result_snip2.PNG" alt="The error" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;The error&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="The query" style="width: 600px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/2439i9E4C1C2D3475D1D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="query_snip1.PNG" alt="The query" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;The query&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:50:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/multiple-columns-in-where-clause-not-working-in-HIVE/m-p/48373#M48257</guid>
      <dc:creator>Saransh</dc:creator>
      <dc:date>2022-09-16T10:50:22Z</dc:date>
    </item>
    <item>
      <title>Re: multiple columns in where clause not working in HIVE</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/multiple-columns-in-where-clause-not-working-in-HIVE/m-p/48380#M48258</link>
      <description>&lt;P&gt;Do I miss anything? I don't see what are in the two pictures..&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2016 10:45:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/multiple-columns-in-where-clause-not-working-in-HIVE/m-p/48380#M48258</guid>
      <dc:creator>EricL</dc:creator>
      <dc:date>2016-12-08T10:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: multiple columns in where clause not working in HIVE</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/multiple-columns-in-where-clause-not-working-in-HIVE/m-p/48383#M48259</link>
      <description>&lt;P&gt;Hi Eric,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The last line of the query&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;where (rel.i_prtitn,rel.i_mod_yr) in (select * from my_prtitn) and rtrim(substr(rel.c_lu_1,3,2)) &amp;gt; ' ';&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;has the two columns "rel.i_prtitn" and "rel.i_mod_yr" &amp;nbsp;in the where clause for which the error is thrown.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Thanks,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="3"&gt;Saransh&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2016 12:25:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/multiple-columns-in-where-clause-not-working-in-HIVE/m-p/48383#M48259</guid>
      <dc:creator>Saransh</dc:creator>
      <dc:date>2016-12-08T12:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: multiple columns in where clause not working in HIVE</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/multiple-columns-in-where-clause-not-working-in-HIVE/m-p/48434#M48260</link>
      <description>&lt;P&gt;I guess this is a limitation of HIVE it can select only a single column for IN subqueries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An Alternative to this can be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier" size="2"&gt;&lt;SPAN&gt;where rel.i_prtitn in&amp;nbsp;(select * from my_prtitn) and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;rel.i_mod_yr in (select * from my_prtitn) and rtrim(substr(rel.c_lu_1,3,2)) &amp;gt; ' ';&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But it won't be an optimized solution. Please reply if you think otherwise.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Dec 2016 07:10:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/multiple-columns-in-where-clause-not-working-in-HIVE/m-p/48434#M48260</guid>
      <dc:creator>Saransh</dc:creator>
      <dc:date>2016-12-12T07:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: multiple columns in where clause not working in HIVE</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/multiple-columns-in-where-clause-not-working-in-HIVE/m-p/48507#M48261</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see the images now, but not sure why they did not show up before. I can see that you are trying to run a query that contains:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(rel.i_prtitn,rel.i_mod_yr) in (select * from my_prtitn)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would like you know that this is currently not supported, please refer to Hive's Apache documentation below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+SubQueries" target="_blank"&gt;https://cwiki.apache.org/confluence/display/Hive/LanguageManual+SubQueries&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It mentions the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;If you want to acheive the same goal, you will need to use JOIN with subQuery on those two columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Eric&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2016 04:52:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/multiple-columns-in-where-clause-not-working-in-HIVE/m-p/48507#M48261</guid>
      <dc:creator>EricL</dc:creator>
      <dc:date>2016-12-14T04:52:08Z</dc:date>
    </item>
  </channel>
</rss>

