You can translate the question and the replies:

Using the COALESCE function with Dates

Will appreciate if someone can help me with the following using the COALESCE function Query purpose: To return a particular Date value. If no Date value is returned, use January 1 0001 as the default Select coalesce(bv_test.find_my_dt, to_date('MMMM dd yyyy', 'January 01 0001')) AS "MY_DATE_VAL" from <table> I am able to save the "coalesce......0001'))" to an output field in Derived View. However when I execute the View or run this SQL in VQL Shell, I get an error. Please help. Thanks
13-07-2017 15:00:46 -0400

1 Answer

Hi, I tried the same syntax which you shared and it works fine for me. Select column1,date_column,coalesce(date_column,to_date('MMMM dd yyyy','January 01 0001')) from view_name I recommend you to check the logs and execution trace to find out what is the error message that is thrown. It helps you to identify what is the problem. The logs can be found at <DENODO_HOME>/logs/vdp If with that you continue having problems, if you have a valid support user, I recommend you to open a support ticket in the Denodo Support site (, so the Support Team will help you to find the reason and solve it. Hope this helps.
Denodo Team
14-07-2017 09:28:34 -0400
You must sign in to add an answer. If you do not have an account, you can register here