Support Questions
Find answers, ask questions, and share your expertise

update with alias not working

Contributor

Hello Team,

 

could you please advise how update with table alias works?

update cbs_cubes.TB_JDV_CBS_NEW
set
a.SUB_SERVICE_CODE_V=b.SUB_SERVICE_CODE_V from cbs_cubes.update1_sub_service_code b
where a.SUB_SERVICE_CODE_V=b.SUB_SERVICE_CODE_V

 

[Cloudera][ImpalaJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:AnalysisException: 'cbs_cubes.TB_JDV_CBS_NEW' is not a valid table alias or reference. ), Query: update cbs_cubes.TB_JDV_CBS_NEW set a.SUB_SERVICE_CODE_V=b.SUB_SERVICE_CODE_V from cbs_cubes.update1_sub_service_code b where a.SUB_SERVICE_CODE_V=b.SUB_SERVICE_CODE_V.

 

Thanks,

Roshan

3 REPLIES 3

Expert Contributor

Hi @roshanbi ,

The query itself seems incomplete to me, I do not see where is the alias "a" defined in the

 

a.SUB_SERVICE_CODE_V=b.SUB_SERVICE_CODE_V

 

part. Also it is not clear which is the database name, which is a table, and is there any complex types involved here.

Can you run a select on the "cbs_cubes.TB_JDV_CBS_NEW"? (assuming that's a "database.table")

Can you run a simple update on it? 

Are you using the latest Cloudera Impala JDBC driver version?

Is the affected table a Kudu based table?

 

Thanks, Miklos

Community Manager

@roshanbi, Following up to check if the reply helped resolve your issue?  If you are still experiencing the issue, can you provide the information @mszurap  has requested?



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

Community Manager

HI @roshanbi, Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.  



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.