Re: left outer join on same table

2011-06-12 Thread sagar naik
.@decide.com] > Sent: Friday, June 10, 2011 9:31 PM > To: user@hive.apache.org > Subject: Re: left outer join on same table > > > > The condition T2.field6='yyy;' is tested after the outer join. As a > result you won't see any non-matching results. > &g

RE: left outer join on same table

2011-06-11 Thread Steven Wong
I think you can also move the condition T2.field6='yyy' into the ON clause. From: Igor Tatarinov [mailto:i...@decide.com] Sent: Friday, June 10, 2011 9:31 PM To: user@hive.apache.org Subject: Re: left outer join on same table The condition T2.field6='yyy;' is tested

Re: left outer join on same table

2011-06-10 Thread Igor Tatarinov
The condition T2.field6='yyy;' is tested after the outer join. As a result you won't see any non-matching results. You'll need a subquery to enforce that condition. Alternatively, adding ' OR T2.field6 IS NULL' might work for you too. Just make sure to use parens around the OR clause. But that'

left outer join on same table

2011-06-10 Thread sagar naik
Hi , I am trying to do join on same table. I wanted to do a left outer join However, the results are not like left outer join( with no null values) select T1.field1, T1.field2, T1.field3 T2.field10 from table T1 left outer join table T2 on (T1.key=T2.key and T1.parti