Does Invantive SQL support multiple condition in a single case statement? I the statement below, I did not get any results. Tried the same statement with only 1 condition (no cascade), this retrieved the expected result.
select prj.code
, prj.startdate
, prj.enddate
from exactonlinerest..projects prj
where prj.code between $P{P_PROJECT_FROM} and $P{P_PROJECT_TO}
and case
/* when (prj.enddate is null or prj.enddate >= sysdate)
then 'Y'
when (prj.enddate is not null and prj.enddate <= sysdate)
then 'N' */
when prj.startdate <= sysdate
then 'B'
end
= $P{P_PROJECT_ACTIVE_FROM}