informatica : why i am getting error while using iif function?

1.2k views Asked by At

I have column 'GENDER' where values 'M or 'F' comes in , anyother value coming, i want to populate as 'UNK' using IIF in expression tranf informatica. i am getting error

operand cannot be converted to number

using below expression

iif(GENDER='M' OR 'F','TRUE','UNK')
1

There are 1 answers

0
Koushik Roy On BEST ANSWER

Please use this code

iif(GENDER='M' OR GENDER='F',GENDER,'UNK')

if its M or F then use original column else populate UNK.