Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on
01-10-2019
08:45 PM
- last edited on
04-21-2026
04:39 AM
by
GrazittiAPI
hello all,
Trying to update a table where date_num is a date(timestamp) and "day" is the field i want to update but i am getting errors
Anyhting wrong with the query below?
update anp_catdidai1_working.dim_bsp_date
set day=day(date_num)
Created 01-20-2019 04:00 PM
Created 01-15-2019 10:56 PM
Created 01-20-2019 09:07 AM
Hi EricL,
This is the error i get:
SQL Error [500051] [HY000]: [Simba][ImpalaJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:AnalysisException: Syntax error in line 1:
update anp_catdidai1_working.dim_bsp_date
^
Encountered: IDENTIFIER
Expected: ALTER, COMPUTE, CREATE, DESCRIBE, DROP, EXPLAIN, GRANT, INSERT, INVALIDATE, LOAD, REFRESH, REVOKE, SELECT, SET, SHOW, TRUNCATE, USE, VALUES, WITH
CAUSED BY: Exception: Syntax error
), Query: update anp_catdidai1_working.dim_bsp_date
set day=day(date_num).
[Simba][ImpalaJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:AnalysisException: Syntax error in line 1:
update anp_catdidai1_working.dim_bsp_date
^
Encountered: IDENTIFIER
Expected: ALTER, COMPUTE, CREATE, DESCRIBE, DROP, EXPLAIN, GRANT, INSERT, INVALIDATE, LOAD, REFRESH, REVOKE, SELECT, SET, SHOW, TRUNCATE, USE, VALUES, WITH
CAUSED BY: Exception: Syntax error
), Query: update anp_catdidai1_working.dim_bsp_date
set day=day(date_num).
com.cloudera.support.exceptions.GeneralException: [Simba][ImpalaJDBCDriver](500051) ERROR processing query/statement. Error Code: 0, SQL state: TStatus(statusCode:ERROR_STATUS, sqlState:HY000, errorMessage:AnalysisException: Syntax error in line 1:
update anp_catdidai1_working.dim_bsp_date
^
Encountered: IDENTIFIER
Expected: ALTER, COMPUTE, CREATE, DESCRIBE, DROP, EXPLAIN, GRANT, INSERT, INVALIDATE, LOAD, REFRESH, REVOKE, SELECT, SET, SHOW, TRUNCATE, USE, VALUES, WITH
CAUSED BY: Exception: Syntax error
), Query: update anp_catdidai1_working.dim_bsp_date
set day=day(date_num).
I also tried with 'day' and same error
Created 01-20-2019 04:00 PM
Created 01-23-2019 01:44 PM
ah i see.
That makes sense now. Thank you