Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> How to implement JOIN ON (a.key <> b.key) or ...NOT IN... semantics


Copy link to this message
-
RE: How to implement JOIN ON (a.key <> b.key) or ...NOT IN... semantics
This is the way to go.
-----Original Message-----
From: Leo Alekseyev [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 15, 2010 6:10 PM
To: <[EMAIL PROTECTED]>
Subject: How to implement JOIN ON (a.key <> b.key) or ...NOT IN... semantics

I need to get rows from table A where the key is not present in table
B.  Something like

SELECT a.val1, a.val2, a.key, b.val FROM a LEFT OUTER JOIN b ON
(a.key=b.key) WHERE b.val IS NULL

seems to achieve the desired result, but is there a better way?..