Nested If Employee
Post date: 01-Jun-2015 15:43:40
Reference: http://forgetcode.com/Informatica/1059-Nested-If
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')