QnaList > Groups > Hive-User > Jul 2014
faq

Query Difference Between 2 Tables

Hi-
I'm stuck on Hive .10 right now and I'm trying to figure out how to accomplish the equivalent of a not exists or minus statement:
Select x from t1 where x not in ( select x from t2)
I know this kind of subquery is available in .13 but would like to find a workaround.
Appreciate any suggestions.

asked Jul 22 2014 at 11:01

Brenden Cobb 's gravatar image



2 Replies for : Query Difference Between 2 Tables
Perfect, thanks very much.
-BC

answered Jul 22 2014 at 14:24

Brenden Cobb 's gravatar image


select x from t1 left outer join t2 on t1.x = t2.x where t2.x is null
should work.
Thanks,
Gunther.
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

answered Jul 22 2014 at 12:03

Gunther Hagleitner 's gravatar image


Related discussions

Tagged

Group Hive-user

asked Jul 22 2014 at 11:01

active Jul 22 2014 at 12:03

posts:3

users:2

©2013 QnaList.com . QnaList is part of ZisaTechnologies LLC.