You can translate the question and the replies:

Rename columns of derived and interface views

Hi, Please advise on using alter statement to rename columns of derived views and interface views. We are using this command, alter view dv_view ( alter column old_coiumn rename new_column ) Error - Syntax error: Exception parsing query near 'rename' Please advise
user
28-07-2021 05:00:09 -0400
code

1 Answer

Hi, ALTER statements can only be used to add descriptions for the columns when altering derived view columns. If you follow the [link](https://community.denodo.com/docs/html/browse/latest/en/vdp/vql/defining_a_derived_view/modifying_a_derived_view/modifying_a_derived_view) to the documentation, you can see the syntax for ALTER statement as below, `ALTER VIEW <name:identifier> ( <ALTER column clause>+ );` Hence, you cannot use an ALTER statement to rename columns in derived views. However, please find a similar question answered in this [link](https://community.denodo.com/answers/question/details?questionId=9064u000000L88aAAC&title=how+to+rename+a+derived+view+column+name) that gives a VQL query for renaming a column in the derived view. Hope this helps!
Denodo Team
28-07-2021 17:33:56 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here