I have been using Talend's Context variables for a while; however, I am now running into an issue as I have never used a variable with Date Datatype before. I have a field in the database called my_date and it is in the format of "DD-MON-YY" and I have created a context variable withe date datatype: context.CLOSING_MONTH and below is my query
select id,due_date from my_table where trunc(due_date) < '"+context.CLOSING_MONTH+"'
however, I have been getting the following error:
java.sql.SQLDataException: ORA-01858: a non-numeric character was found where a numeric was expected
the value of context.CLOSING_MONTH is: 2019-07-01 00:00:00
the odd thing is that if I remove the context variable and put its exact value (hard coding it) the error disappears.
Your help is really appreciated!