I have a hard time working with Oracle Responsys, Im trying to put a condition of less than 3 years from today-workdate, I have a timestamp called workdate
select * from $A$ where (to_char(workdate,'dd-mm-yy')-to_char(sysdate,'dd-mm-yy'))/365.242199<=3
Responsys doesn't like it, so I check the functions within Responsys and changed my sql code to :
select * from $A$ where $subtract_dates(workdate,now())$/365.242199<=3
Responsys still doesn't take it.
Responsys is not 100% oracle syntax. What's the right way to do it?? Thanks so much for whoever can help with this.
FYI The error msg is sql command not properly end.
Right answer
select * from $A$ where workdate <= add_months(current_timestamp,-36)