'IFF Statement - Informatica powerCenter
I've seen an IFF that I have to translate to Java, but I'm not sure what it does. Is similar to:
IFF(cod=199, mot <> 'A', null);
I have a table of records, in which they are going to pass a filter, one column is cod and another is mot.
The IFF is in a filter, if a cod is different from 199, is that record deleted because there is a null in the "else"?
In another language would it be equal to:?
if (code == 199) {
return mot != 'A'
} else {
return false??; or return null?
}
Solution 1:[1]
Since IIF is in a filter, null condition is always false and will exclude the data from going ahead and excluded from that point. And you can combine both condition into one - if (code == 199 and mot != 'A') then true else false. So, equivalent code can be -
if (code == 199 and mot != 'A') {
return true
} else {
return false}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Koushik Roy |