RE: NOT IN query

2010-11-04 Thread Bennie Schut
You can use a left outer join which works in all databases. select a.value from tablea a left outer join tableb b on (b.value = a.value) where b.value is null; Databases are generally pretty good at doing joins so this usually performs good. From: איל (Eyal)

Re: NOT IN query

2010-11-03 Thread Tim Robertson
Please try this in Hive: select distinct a.id from tableA a LEFT OUTER join tableB b on a.id=b.id where b.id is null Cheers, Tim On Wed, Nov 3, 2010 at 1:19 PM, Tim Robertson wrote: > In SQL you use a left join: > > # so in mysql: > select distinct a.id from tableA a left join tableB b on a.id=

Re: NOT IN query

2010-11-03 Thread Tim Robertson
In SQL you use a left join: # so in mysql: select distinct a.id from tableA a left join tableB b on a.id=b.id where b.id is null Not sure exactly how that ports to Hive, but it should be something along those lines. HTH, Tim On Wed, Nov 3, 2010 at 1:13 PM, איל (Eyal) wrote: > Hi, > > I have a