You can translate the question and the replies:

Error in CASE Clause end as {name} in field expression

Dear support team, I have a problem in putting a specific column name in my case clause, below is the line I'm running in the field expression. When i set it to ***end as priority*** it shows that "Could't repair and continue parse" but when i set the it as ***end***, it has no errors. May I know what is the solution on this? I have referenced to [CASE Clause](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/appendix/case_clause_examples/case_clause_examples#case-clause-examples) and [CASE Clause Examples](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/appendix/case_clause_examples/case_clause_examples#case-clause-examples). case substr(trim(shipment),1,3) when 'A' then '1' when 'B' then '2' when 'C' then '3' end as priority
user
07-02-2022 21:22:03 -0500
code

1 Answer

Hi, I am able to reproduce this error ”*Couldn't repair and continue parse*” while trying to add a field with a similar field expression using CASE WHEN Statements from the Web Design Studio. This issue occurs when you provide both the alias name using the field expression and the “Field Name” to the new field. In order to resolve this error, you can provide the name in the “Field name” option instead of using the alias name in the field expression. For more information, you can refer to the [Creating Derived Views](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_derived_views/creating_derived_views) section of the Virtual DataPort Administration Guide.
Denodo Team
08-02-2022 06:22:45 -0500
code
You must sign in to add an answer. If you do not have an account, you can register here