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

Switch to Plain View
Hive >> mail # user >> Re: how to join like a "In A but not in B" operation?


+
sac.khurana@... 2012-03-12, 04:05
+
Richard 2012-03-12, 03:52
+
sac.khurana@... 2012-03-12, 04:03
+
Richard 2012-03-12, 05:26
+
Raghunath, Ranjith 2012-03-12, 05:43
+
sac.khurana@... 2012-03-12, 12:44
+
Evan Pollan 2012-03-12, 04:03
Copy link to this message
-
Re:Re: how to join like a "In A but not in B" operation?
this approach works, I did not realize "var=NULL" is different from "var is NULL" before.
 
Richard
At 2012-03-12 12:03:00,"Evan Pollan" <[EMAIL PROTECTED]> wrote:

I used a left outer join with a constraint on a joined row column value being null -- logically equivalent to a "not in" clause.  Looks funny, but it works.

On Mar 11, 2012, at 10:52 PM, "Richard" <[EMAIL PROTECTED]> wrote:
hi,
 
how can I join two tables A and B so that the result is "In A but not in B"?
 
let's take an example, say, the column to identify record is id.
e.g.
 
  select A.* from A join B on (A.id = B.id)
 
thanks.
Richard