Closed
Description
This bit of (Postgresql valid) SQL fails:
select
t0.*
, cr.code
from
mytable t0
join othertable cr ON cr.code = '1234'
where
COALESCE (cast(to_date(to_char(t0.datum_ontslagen,'YYYYMMDD'),'YYYYMMDD')||' '||t0.tijd_ontslagen as timestamp), current_timestamp(0)) -
cast(to_date(to_char(t0.datum_opname,'YYYYMMDD'),'YYYYMMDD')||' '||t0.tijd_opname as timestamp)
>= (SELECT somefunction()) * interval '1 hours'
net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "(" "("
at line 8, column 13.