You can translate the question and the replies:

How to define CASE statement in view parameters

Hi, I need to use a case statement in Denodo view parameters. whenever a defaut date is selected (ex: 1900-01-01) it should fetch data based case condition(ex: current_date-1) else it should fetch data by given date. Ex: case when start_date='1900-01-01' then current_date-1 else start_date end Please let me know if there is an option to use case statement in Denodo pramaeters. Thanks in Advance!
user
16-02-2021 00:42:20 -0500
code

1 Answer

Hi, I would do the following steps to define the “**CASE**” statement over the field of view parameter: * First, I would create a [“**Selection view**”](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_derived_views/creating_selection_views/creating_selection_views) over the derived view that is having the “**View Parameter**”. * I would navigate to the “**Edit->Output**” tab. * Then, I would select the “**View Parameter**” field and define the “case” statement in the field expression. Hence at the moment in the Denodo Platform, defining the **case** statement over the “**View Parameter**” field is possible only by creating a derived view over the view that includes the “**View Parameter**”. For more information, you can refer to the [**Parameters of Derived Views**](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_derived_views/creating_selection_views/creating_selection_views#parameters-of-derived-views#:~:text=Parameters%20of%20Derived%20Views) of the Virtual DataPort Administration guide. Hope this helps!
Denodo Team
16-02-2021 07:52:05 -0500
code
You must sign in to add an answer. If you do not have an account, you can register here