Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

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


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
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB