【问题标题】:what is difference between IIF and DECODE in informatica?informatica 中的 IIF 和 DECODE 有什么区别?
【发布时间】:2016-09-02 16:19:00
【问题描述】:

informatica power center中的IIF和DECODE函数有什么区别。

【问题讨论】:

    标签: informatica informatica-powercenter


    【解决方案1】:

    Decode 可用于Select 语句,而IIF 不能用于Select 语句。

    【讨论】:

    • 你能具体一点,帮我举个例子吗?
    【解决方案2】:

    据我所知,如果我找到第一个匹配项,Decode 将停止进一步查找,IIF 将完成搜索直到结束

    你也可以在 select 子句中使用 Decode

    【讨论】:

      【解决方案3】:

      首先,DECODE 为您提供比嵌套 IIF 更简洁的代码。此外,在这些情况下效率更高。

      【讨论】:

        【解决方案4】:

        解码

        查找列值并根据表达式生成结果

        Syntax:	DECODE (Column_name or ‘Value’, Search1, Result1, Search2, Result2, ….., Default)
         
        Argument	              Mandatory/Optional	Description
        Column_name or Value	  Mandatory	Value that is to be passed to the function
        Search	Mandatory	      Argument that is to be searched 
        Result	Mandatory	      Result for the search value
        Default	Optional	      Default value in case of search does not 
        
        Example1: DECODE (ID, 1, ‘US
        3, ‘Australia’, ‘None’)
        Input Data:	ID		Value 
                    1	    US
                    2	    UK
                    3	    Australia
                    4	
                            Africa
        
        Output Data:	ID		Value 
                        1	    US
                        2	    None
                        3	    Australia
                        4	    None
                        None

        **

        查找列值并根据表达式生成结果

        【讨论】:

          猜你喜欢
          • 2018-10-02
          • 2013-11-03
          • 1970-01-01
          • 1970-01-01
          • 2010-10-02
          • 2011-12-12
          • 2010-09-16
          • 2012-03-14
          • 2012-02-06
          相关资源
          最近更新 更多