You can translate the question and the replies:

Problems in converting oracle math operation and the concatenation operator

Hi support team, I'm having trouble putting this query into my view WHERE CONDITIONS, there is an AND Operators in front of the line This is my original query from oracle ... AND datedata+(8/24)>=todate(tochar((sysdate+16/24)-1,'YYYY-MM-DD')|| '00:00:00','YYYY-MM-DD HH24:MI: SS') Then I convert it to denodo format ... AND ADDHOUR(datedata, 8)>=TOTIMESTAMP('YYYY-MM-DD HH24:MI:SS', CAST(ADDHOUR(CURRENTDATE,16)-1, 'YYYY-MM-DD') || '00:00:00') However, I get the error on this line *CAST(ADDHOUR(CURRENTDATE,16)-1*, it says **text invalid parameter types for function '-': timestamp, int**. How can I convert it to make it to fit my query, it also follows with an error **invalid parameter types for function '||': <unknown>**. Thank you for the help
08-02-2022 22:51:49 -0500

1 Answer

Hi, I understand that you are converting the Oracle query to compatible Denodo VQL. For this scenario, I would use Denodo Functions such as [ADDHOUR](, [ADDDAY]( and [CAST]( to obtain the same results as your source query. For instance, you could try a query like below: select cast (addday(addhour(CURRENT_date, <hours to add>), <days to add>) as Date) Furthermore,you can also obtain the date in any desired formats using the Datetime functions such as [FORMATDATE]( and [TO_DATE]( . You can also refer the Knowledge Base article [Oracle SQL to Denodo VQL Quick Reference]( which can guide you to identify the equivalent Denodo Functions. Hope this helps!
Denodo Team
09-02-2022 04:57:35 -0500
You must sign in to add an answer. If you do not have an account, you can register here