Coalesce on dateparam

Hi. We have two views, each has dateparam (date('@dateparam') in base views). We created a union view with these two views (where condition has the dateparam1=dateparam2). Then, we proceeded to remove a few objects from the output and coalesce the rest. We did not have issues with coalesce on most fields until we attempt to coalesce the dateparams. The coalesce (dateparam1,dateparam2) works ONLY if we leave dateparam1 and dateparam2 in the output. If we remove it, leaving only the coalesced output, we receive an error SQLCODE = -206 SQLERRMC=NULL. Has anyone encoutnered this scenario? Thanks!
user
08-05-2019 16:27:55 -0400

1 Answer

Hi, When you fetch the coalesce of arguments/attributes/parameters which do not exist in the select statement it will throw an error of invalid context which is SQLCODE = -206, which means the coalesce function is trying to find the column which does not exist in the view. Also, I’m not sure if I understand the situation you describe correctly. I tried replicating a similar scenario, according to the description you are removing the 2 input parameters (dateparam1 and dateparam2) from the output, but those are mandatory and cannot be removed. If you can provide more details and clarify this it would help to understand the situation. In any case, if you are a customer, you can file a customer support case and provide further details. Hope this helps!
Denodo Team
13-05-2019 19:42:29 -0400
You must sign in to add an answer. If you do not have an account, you can register here