Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Decode - Value Search or Nested If Else in Informatica

Decode function searches ports for a specified value, it can also be used as Nested if Else function
DECODE( value, first_search, first_result [, second_search, second_result ]…[,
default ] )


Example : Find the price of given item
DECODE(item,'Pen',10,'Pencil',2,'Eraser',3,0)

Sample InputReturn Value
Pencil2
Ruler0


Example : Using decode as nested if
DECODE(true,country='India','INR',country='US','DOLLAR',country='UK','GBP','DOLLAR')

CountryReturn Value
UKGBP
South AfricaDOLLAR