Oracle Transactional Business Intelligence
Case When for date fields
Case when date is lesser than or equal to another date, THEN "on time", ELSE, "Not on time"
I'm trying to build a Case statement that shows If one date is lesser than or equal to another, say "on time", else, say "not on time" (or some other decided upon phrase). Is that possible to do in OBIEE? Or can I only do Case statements when the the "Then" and the "Else" are other columns? Any thoughts on how to trick the column to do what I want it to do?
Yes this is possible! You would put the hard-coded value inside single quotation/apostrophe marks.
CASE WHEN DATE1 <= DATE2 THEN 'On Time' ELSE 'Not on Time' END
Yes! That was all that I needed. I had the statement written but was using double quotes. Thanks!