<?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 can I solve this sql problem? (like join in Hive) in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-solve-this-sql-problem-like-join-in-Hive/m-p/350201#M235919</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99675"&gt;@ho_ddeok&lt;/a&gt;,&amp;nbsp;Has any of the replies helped resolve your issue? If so, can you please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2022 06:02:50 GMT</pubDate>
    <dc:creator>VidyaSargur</dc:creator>
    <dc:date>2022-08-17T06:02:50Z</dc:date>
    <item>
      <title>How can I solve this sql problem? (like join in Hive)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-solve-this-sql-problem-like-join-in-Hive/m-p/349688#M235736</link>
      <description>&lt;P&gt;I know Hive only provide &lt;U&gt;&lt;STRONG&gt;equi join&lt;/STRONG&gt;&lt;/U&gt;. For example, below sql statement.&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from A join B&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; on A.c1 = B.c2&lt;/P&gt;&lt;P&gt;where 1=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I want to execute &lt;U&gt;&lt;STRONG&gt;Like join&lt;/STRONG&gt;&lt;/U&gt; Query in Hive. For example, below sql statement.&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from A join B&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; on A.c1 like B.c2&lt;/P&gt;&lt;P&gt;where 1=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if you know the solution in Hive.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 07:22:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-solve-this-sql-problem-like-join-in-Hive/m-p/349688#M235736</guid>
      <dc:creator>ho_ddeok</dc:creator>
      <dc:date>2022-08-08T07:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I solve this sql problem? (like join in Hive)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-solve-this-sql-problem-like-join-in-Hive/m-p/349737#M235752</link>
      <description>&lt;P&gt;Both the queries should work fine in CDP-7.x Hive&lt;/P&gt;&lt;P&gt;Can you share the exception trace if you face any issue ?&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 00:51:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-solve-this-sql-problem-like-join-in-Hive/m-p/349737#M235752</guid>
      <dc:creator>nramanaiah</dc:creator>
      <dc:date>2022-08-09T00:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can I solve this sql problem? (like join in Hive)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-solve-this-sql-problem-like-join-in-Hive/m-p/349740#M235754</link>
      <description>&lt;P&gt;FAILED: SemanticException [Error 10017]: Line 5:8 Both left and right aliases encountered in JOIN ''%''&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;executed sql &amp;gt;&lt;/P&gt;&lt;P&gt;select *&lt;/P&gt;&lt;P&gt;from table_A a&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; join&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; table_B b&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; on a.col_1 like concat('%', b.col_2, '%')&lt;/P&gt;&lt;P&gt;where 1=1&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using HDP 2.6.2 version and Hive 1.2.1000 version&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 04:39:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-solve-this-sql-problem-like-join-in-Hive/m-p/349740#M235754</guid>
      <dc:creator>ho_ddeok</dc:creator>
      <dc:date>2022-08-09T04:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: How can I solve this sql problem? (like join in Hive)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-solve-this-sql-problem-like-join-in-Hive/m-p/349741#M235755</link>
      <description>&lt;P&gt;I am able to run the above SQL in CDP 7.1.7 SP1 without any issue. Please try it in CDP.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 05:45:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-solve-this-sql-problem-like-join-in-Hive/m-p/349741#M235755</guid>
      <dc:creator>nramanaiah</dc:creator>
      <dc:date>2022-08-09T05:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: How can I solve this sql problem? (like join in Hive)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-solve-this-sql-problem-like-join-in-Hive/m-p/349746#M235756</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99675"&gt;@ho_ddeok&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hive 1 is a very old version and and equi-join was probably the only option available back then. As&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/61058"&gt;@nramanaiah&lt;/a&gt;&amp;nbsp;mentioned, you should consider upgrading to the latest version, where this statement works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nevertheless, you can try the following alternative query. I'm not sure if it works, though, since I don't have a Hive 1 environment to test this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;select *
from A cross join B
where A.c1 like B.c2;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Aug 2022 06:25:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-solve-this-sql-problem-like-join-in-Hive/m-p/349746#M235756</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-08-09T06:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I solve this sql problem? (like join in Hive)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-solve-this-sql-problem-like-join-in-Hive/m-p/350201#M235919</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/99675"&gt;@ho_ddeok&lt;/a&gt;,&amp;nbsp;Has any of the replies helped resolve your issue? If so, can you please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 06:02:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-solve-this-sql-problem-like-join-in-Hive/m-p/350201#M235919</guid>
      <dc:creator>VidyaSargur</dc:creator>
      <dc:date>2022-08-17T06:02:50Z</dc:date>
    </item>
  </channel>
</rss>

