Using >= or <= in query of GEL

Discussion created by martin.snizek on Nov 21, 2012
Latest reply on Nov 22, 2012 by Owen_R
I need to use relational operators in query of my GEL script. I need to use exactly >= or <=. I tried to use escapeText="true" and escapeText="false". But nothing is working, I also tried &gt; and &lt;

Have anybody got idea how to solve it?

Here is my query (using custom object tables).
select code, 'PSR', name
from inv_investments inv
left join odf_ca_inv oin on
left join odf_ca_project oip on
where inv.odf_object_code='project'
and oin.i_inv_categ='project'
and oip.last_status_rep_date is not null
and oip.partition_code = 'STANDARD'
and stage_code in ('DDRE','FS')
and ((to_date(sysdate)-to_date(oip.last_status_rep_date))
-FLOOR ((to_date(sysdate)-to_date(oip.last_status_rep_date))/7)*2
-(SELECT Count(ID) FROM odf_ca_i_svatky  WHERE i_datum BETWEEN oip.last_status_rep_date AND sysdate)
-DECODE(SIGN(TO_CHAR(sysdate,'D')- TO_CHAR(oip.last_status_rep_date,'D')),-1,2,0)
+(CASE WHEN to_char(oip.last_status_rep_date,'D')=7 then 1 else 0 End)
-(CASE WHEN to_char(sysdate,'D')=7 then 1 else 0 End)) >= 3
Whole script attached

Martin Snizek