I have the following decode statement in an expression transformation in informatica: (DECODE(TRUE, OPERATION1='I' and NOT ISNULL(anew),'YES', OPERATION1='D'and NOT ISNULL(aold),'YES', OPERATION1='U'and ( ((ab)or (ISNULL(anew) and NOT ISNULL(aold))or (NOT ISNULL(anew) and ISNULL(aold)))),'YES','NO CHANGE'))Where anew and aold are both integers (when they appear at all).Here's the weird part:This decode statement, when run, constantly returns a value of 0 (zero). I can't for the life of me figure out why. When I run this in the debugger and evaluate the decode (right click on the expression, click on 'evaluate expression', paste the decode in) it evaluates to either YES or NO CHANGE correctly. But when it actually runs, both in the debugger and in production, it still evaluates to zero. Does anybody know why?
If ‘expr’ is equal to exprval1 then ’exprrep1’ is returned, if ‘expr’ is equal to ‘exprval2’ then ’exprrep2’ is return, if ‘expr’ is equal to ‘exprval3’ then ’exprrep3’ is returned, if nothig is matching then ’else-expr’ will be returned.implements the decode function as a variant of a simple case expression, and it is equivalent to the expression “case x when val1 then result 1 when val2 then result 2 else default end.” Except if both x and val1 contain NULL values, unlike a case expression, decode considers the NULL values to be equal. Netezza DECODE Function ExampleBelow is the Netezza DECODE Function Example: SYSTEM.ADMIN(ADMIN)= select DECODE(cnt,1,'One',2,'Two',3,'Three','None') as countersSYSTEM.ADMIN(ADMIN)- from (select 1 as cnt union all select 2 as cnt union all select 3 union all select 4 as cnt) a;COUNTERS-OneTwoThreeNone(4 rows)Read.
Informatica provides a transformation language that includes SQL-like functions to transform source data. The following example uses FALSE in a DECODE expression to return values based on the results of a. Use the ISNULL function. TRUE Returns a value based on the result of a comparison. TRUE is equivalent to the integer 1. To filter Null values in Informatica you can use the ISNULL function. ISNULL Function will test the value for port and check if the value is null.