【问题标题】:Nested IF THEN ELSE Operator in SSIS Derived Column在 SSIS 派生列中嵌套 IF THEN ELSE 运算符
【发布时间】:2015-12-03 17:25:26
【问题描述】:

我有一个 Excel,我正试图将它加载到我的数据库中的一个表中。 excel 文件有一个名为“位置代码”的列。我在我的 SSIS 包中使用派生列来满足条件

If 'Location Code' = "NULL" OR If 'Location Code' ISNULL OR If 'Location Code' = "" then 'Location Code' else "5"+""+'Location Code' //(concatenating '5' with the Location Code).

如何在派生列中实现上述目标?

【问题讨论】:

    标签: ssis-2012


    【解决方案1】:

    我终于找到了我的问题的答案。下面,我提供了确切的语法:

    (DT_WSTR,50)[Location Code] == "NULL" || ISNULL([Location Code]) || (DT_WSTR,50)[Location Code] == "" ? (DT_WSTR,50)[Location Code] : (DT_WSTR,10)5 + (DT_WSTR,50)[Location Code]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-02
      • 2012-11-25
      • 1970-01-01
      • 1970-01-01
      • 2013-11-09
      • 1970-01-01
      相关资源
      最近更新 更多