You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Andy Srine <an...@gmail.com> on 2018/02/14 07:24:18 UTC

Hive update question

Hi Team,

Whats the best way to do an update on one table from another? Variations of
this syntax below doesn't seem to work:

UPDATE table_x
SET column_1 = B.column_1
FROM
table_y B
WHERE column_2 = B.column_2
;


Thanks,
Andy

Re: Hive update question

Posted by balajee venkatesh <ba...@gmail.com>.
Overwrite your table by taking left join with another table. Let me know if
you want any syntactical help.

On 14-Feb-2018 12:54 PM, "Andy Srine" <an...@gmail.com> wrote:

> Hi Team,
>
> Whats the best way to do an update on one table from another? Variations
> of this syntax below doesn't seem to work:
>
> UPDATE table_x
> SET column_1 = B.column_1
> FROM
> table_y B
> WHERE column_2 = B.column_2
> ;
>
>
> Thanks,
> Andy
>
>