作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在 SSIS 包中,我导出了列,我想在其中格式化电话,如下所示:
CASE
WHEN TRY_CONVERT(BIGINT, phone) IS NULL THEN
NULL
ELSE
phone
END
最佳答案
派生列
您必须使用以下表达式:
(DT_I8)[Phone] == (DT_I8)[Phone] ? [Phone] : NULL(DT_WSTR,50)
(DT_WSTR,50)
数据类型为 [Phone]
.
Click here for more information
Ignore Failure
if(!Row.Phone_IsNull && !String.IsNullOrEmpty(Row.Phone) && Int64.TryParse(Row.Phone, out long number)){
Row.OutPhone = Row.Phone;
}else{
Row.OutPhone_IsNull = true;
}
关于sql-server - 如何在 SSIS 中实现 TRY_CONVERT 功能?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55482719/
我是一名优秀的程序员,十分优秀!