Let's just say this.  Coercing hive into doing something its not meant to
do is kinda a waste of time. Sure you can rewrite any update as a
delete/insert but that's not the point of Hive.

Seems like your going down a path here that's not optimal for your
situation.

You know, I could buy a Tesla and bury it in the ground and use it as a
root cellar - but why?

Cheers,
Stephen


On Mon, Mar 3, 2014 at 10:45 PM, yogesh dhari <yogeshh...@gmail.com> wrote:

> Hello All,
>
> I have a use case in RDBMS query which I have implemented in
> HIVE as..
>
>
>
> *1.1) Update statement* *in RDBMS*
>
> update  TABLE1
> set
> Age= case when isnull(age,'') ='' then 'A= Current' else '240+ Days' end,
> Prev_Age=case when isnull(prev_age,'') ='' then 'A= Current' else '240+
> Days' end;
> *1.2) Update statement* *in HIVE*
>
> create table  TABLE2 as select
> a.* ,
> case when coalesce(a.age,'')='' then 'A=Current' else '240+ Days' end as
> Age,
> case when coalesce(a.prev_age,'')='' then 'A=Current' else '240+ Days' end
> as Prev_age from TABLE1 a ;
>
>
>
>
>
> *Now I have a case statement in which I have a join condition*.
>
>
>
> *2) Join in RDBMS*
> update  TABLE1
> set a.Age = c.sys_buscd_item_desc1
> from  TABLE1 a
> join  TABLE2 c
> on c.sys_type_cd='AGE'
> where isnull(a.age,'00')=c.sys_item;
> commit;
>
>
>
>
>
> How can I implement this query into Hive, Pls help and suggest.
>
>
>
> Thanks In Advance
>
> Yogesh Kumar
>
>
>
>
>
>
>

Reply via email to