I'm trying to compare a date value I just entered in my item (:P2007_Session_Date -it is a date picker-) with date values from my table. This new value has not yet been saved in my database. How can i do that? I am trying with DA but nothing happens
When:
Event: Change, item: P2007_Session_date
True Action Set Value:
SQL Statement
SELECT POLICIES.PRICE FROM POLICIES WHERE POLICIES.ACTIVE = 1 AND to_char(**:P2007_Session_Date**, 'YYYY-MM-DD') BETWEEN to_char(POLICIES.START_DATE, 'YYYY-MM-DD') AND to_char(POLICIES.END_DATE, 'YYYY-MM-DD');
Items to Submit
:P2007_Session_Date, :P2007_Price
Affected Elements
:P2007_Price
This gives me this error Ajax call returned server error ORA-01722: not acceptable number for Set Value. but when i change my query from to_char(:P2007_Session_Date, 'YYYY-MM-DD') to to_char(sysdate, 'YYYY-MM-DD') it works! The problem is that i want to check not with sysdate but with the value that user just enter to :P2007_Session_Date item and it is not yet stored in the database.