Created 09-03-2016 01:05 PM
I don't know what I am doing wrong .
UPDATE acid_xyz SET hire_date = (select from_date from acid_abc where acid_xyz.eid = acid_abc.eid);
Created 09-03-2016 02:10 PM
Your select clause doesn't make sense. I cannot be sure but are you trying to do the following?
select from_date from acid_abc inner join acid_xyz on acid_xyz.eid = acid_abc.eid
Created 09-03-2016 02:16 PM
@mqureshi I am trying to update value of hire_date of xyz table with from_date of abc table where the eid matches.
Created 09-03-2016 02:22 PM
Yes I know but where clause in your select query doesn't make sense. Try to run just the select clause and see what you get.
Created 09-03-2016 02:39 PM
@mqureshi : Still not working.
Created 09-06-2016 02:37 AM
Per apache hive documentation subquery for update is not supported
Standard Syntax: UPDATE tablename SET column = value [, column = value ...] [WHERE expression] |
Created 09-06-2016 06:53 PM
Also note that support for a JOIN clause in the update statement is not available. See this HCC article for more information and a link to the Hive JIRA requesting support for a MERGE statement. https://community.hortonworks.com/questions/11652/how-to-update-hive-row-with-join.html
Created 09-07-2016 01:34 AM
Please disclose the source of your questions recently posted.