Could anyone help me with writing case statements in Informatica PowerCenter Designer? I am fairly new to Informatica, and based on my limited experience I feel case statements aren't supported. There is a decode function with similar functionality, but I am unable to find any good examples on the syntax.
I would really appreciate if anyone could give me some specific examples on how to use case statements/decode function in Informatica.
Thanks much for your help!
You're right - there is no CASE
statement, but you can use DECODE
to simulate it:
DECODE( TRUE
, DECIMAL_PORT > 0, 'positive value'
, DECIMAL_PORT < 0, 'negative value'
, 'zero' )
It is an equivalent of the following Transact-SQL CASE
statement:
CASE
WHEN DECIMAL_PORT > 0 THEN 'positive value'
WHEN DECIMAL_PORT < 0 THEN 'negative value'
ELSE 'zero'
END
Here's how it works:
TRUE
value,If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With