how to write subquery and use "In" Clause in Hive
-
How can I use In clause in Hive I want to write something like this in Hive select x from y where y.z in (select distinct z from y) order by x; But I am not finding any way of doing it.. I tried In clause in Hive 0.7 it was throwing error, Also I tried Find_in_Set .. using find_in_set(y.z,subquery).. but the job is getting failed. I want to do this on Hive. Please help me if anybody knows how to do this in Hive.. Thanks & Regards, Atul
-
Answer:
According to https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select: "Hive does not support IN, EXISTS or subqueries in the WHERE clause." You might want to look at: https://issues.apache.org/jira/browse/HIVE-801 https://issues.apache.org/jira/browse/HIVE-1799
user722856 at Stack Overflow Visit the source
Related Q & A:
- How To Write Invitation Card?Best solution by Yahoo! Answers
- How To Write An Article?Best solution by Yahoo! Answers
- How To Write A Resume?Best solution by Yahoo! Answers
- How To Write An Example Resume?Best solution by Yahoo! Answers
- How to write SQL statement with dynamic where clause?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.