I know this will sound stupid, especially here, but I am having trouble with this. I know decode is like a if-then-else statement, but I am having difficulty converting this into a IF-THEN_ELSE statement to be used in a query field in Crystal Reports.
decode(workorder.pmnum,null,decode(workorder.istask,0,nvl(workorder.schedfinish,workorder.targcompdate),null),decode(workorder.istask,0,workorder.llyreqdcompdate,nvl(workorder.schedfinish,workorder.targcompdate))) as reqdcompdate