Using comparison operator against a date and a date literal
Hello there,
I'm trying to create a filter on my report by comparing a date field and a date literal however I've had error messages each time and wonder if anyone tell me where I'm going wrong.
Standard comparison code between date field and literal = "- Contact Optimized Custom Attributes".OPT_DATE_0 < date '2014-12-19'
NOW...
I try to build my own = "- Contact Optimized Custom Attributes".OPT_DATE_0 < date TRIM(CAST(YEAR(CURRENT_DATE)-1 AS CHAR)) || '-12' || '-19'
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <TRIM>: Syntax error [nQSError: 26012] . (HY000)