Nested If in Informatica

Nested If condition can be performed using nested IIF statements or Decode function,

Example : Calculate Grade for the give marks, using nested IIF
IIF(MARKS>=90,'A',
(IIF(MARKS>= 75,'B',
(IIF(MARKS>=65,'C',
(IIF(MARKS>=55,'D',
IIF(MARKS>=45,'E',
'F'))))))))


Example : Calculate Grade for the give marks, using Decode
DECODE(TRUE,
MARKS>=90,'A',
MARKS>=75,'B',
MARKS>=65,'C',
MARKS>=55,'D',
MARKS>=45,'E',
'F')


Decode will return when the first match is found, so the ordering is important. Nested iif using decode statement is preferred over multiple iif statments.