Unanswered: Greater and Least Function equivalent in DB2
I want to convert the following Oracle SQL into DB2 SQL I am having issues dealing with the Grater and Least Functions:
CASE WHEN integrated = 0 THEN
CASE WHEN centered = 0 THEN
GREATEST(tl.timelabel - (1/24),STARTTIME)
WHEN centered <> 0 THEN
GREATEST(tl.timelabel - (1/24),mwseg.starttime + 0.5 * (mwseg.stopTime-(mwseg.rampdown/(24*60)) - STARTTIME ) )
Any help appreciated, I already did a quick search with no luck, sorry if it is a repeat post.