如果我没有在informatica中指定解码默认值,该怎么办?

时间:2017-06-28 09:43:37

标签: decode informatica informatica-powercenter

如果我没有在informatica中指定默认值,那么它默认会考虑什么?

我的基本问题是

这两个声明是否相同

DECODE(ABC, 'XYZ', 'XZ', 'OYE', 'KYA')

DECODE(abc,'XYZ','XZ','OYE','KYA',abc)

1 个答案:

答案 0 :(得分:1)

Return Value of DECODE

1.First_result if the search finds a matching value. 
2.Default value if the search does not find a matching value. 
3.NULL if you omit the default argument and the search does not find a matching value. 
4. Even if multiple conditions are met, the Data Integration Service returns the first matching result. 
5.If the data contains multibyte characters and the DECODE expression compares string data, the return value depends on the code page and data movement mode of the Data Integration Service.  

因此,在您的第一个语句中 - 如果没有匹配,则返回NULL。

在第二个版本中,如果没有匹配则返回列数据