Hello Stephen ,
Yes, actully I have used Left Outer Join instead of Join, there were left
outer joins in RDBMS Query instead of join.
Thanks again :)
On Thu, Feb 20, 2014 at 10:45 AM, Stephen Sprague wrote:
> Hi Yogesh,
>
> i overlooked one thing and for completeness we should make note of it
Hi Yogesh,
i overlooked one thing and for completeness we should make note of it here.
change:
-- non-intersected rows
select a.* from TABLE_SQL a join NEW_BALS b on (a.key=b.key) where
b.NEW_BALANCE is null
to
-- non-intersected rows
select a.* from TABLE_SQL a *LEFT OUTER* join NEW_BAL
Thanks a lot Stephen Sprague :) :)
It worked.. , just to remove the " ; " from here, bcoz it was throuig
sub query systax error...
create table NEW_BALS as
select * from (
select b.prev as NEW_BALANCE, a.key from TABLE_SQL a join TABLE_SQL_2 b on
(a.key=b.key) where a.code='1';
UNION ALL
sel
maybe consider something along these lines. nb. not tested.
-- temp table holding new balances + key
create table NEW_BALS as
select * from (
select b.prev as NEW_BALANCE, a.key from TABLE_SQL a join TABLE_SQL_2
b on (a.key=b.key) where a.code='1';
UNION ALL
select b.prev as N
>
>>
>> trilliumsoftware.com <http://www.trilliumsoftware.com/> /
>> linkedin<http://www.linkedin.com/company/17710>
>> / twitter <https://twitter.com/trilliumsw> /
>> facebook<http://www.facebook.com/HarteHanks>
>>
>>
>>
>>
g]<http://www.trilliumsoftware.com/>
>
> trilliumsoftware.com <http://www.trilliumsoftware.com/> /
> linkedin<http://www.linkedin.com/company/17710>
> / twitter <https://twitter.com/trilliumsw> /
> facebook<http://www.facebook.com/HarteHanks>
>
>
>
om<http://www.trilliumsoftware.com/> /
linkedin<http://www.linkedin.com/company/17710> /
twitter<https://twitter.com/trilliumsw> /
facebook<http://www.facebook.com/HarteHanks>
From: yogesh dhari [mailto:yogeshh...@gmail.com]
Sent: 18 February 2014 12:39
To: user@hive.apache.org
Hello All,
I have a use case where a table say TABLE_SQL is geting updated like.
1st Update Command
update TABLE_SQL a
set BALANCE = b.prev
from TABLE_SQL_2 b
where a.key = b.key and a.code = "1"
2nd Update Command
update TABLE_SQL a
set BALANCE = b.prev
from TABLE_SQL_3 b
where a.key = b.ke