This content has been marked as final. Show 3 replies
DECODE is an IF THEN ELSE function with commas separating the command names.
For example, DECODE(a,b,c,d) means IF a = b THEN c ELSE d
So in your case, DECODE(NVL(FTE Days Available SUM,0),0,0,FTE Days Absent SUM/FTE Days Available SUM) this means:
IF NVL(FTE Days Available SUM,0) = 0 THEN 0 ELSE FTE Days Absent SUM / FTE Days Available SUM
Basically it calculates the percentage of days absent compared to days available. However because we cannot divide by a NULL or zero this is why you have to just use zero whenever FTE Days Available is NULL or zero.
Hope this helps