SSIS派生列错误(强制类型)

时间:2018-06-15 19:14:11

标签: ssis casting derived-column

我想总计2列(调整到期日和到期日):

DATEADD("dd",(DT_I4)AdjustmentDueDayCode,ExpirationDate)

我不断收到以下错误消息:

An error occurred while attempting to perform a type cast
SSIS Error Code `DTS_E_INDUCEDTRANSFORMFAILUREONERROR*`

我认为可能是因为null,所以写了以下内容:

(DT_I4)AdjustmentDueDayCode > 0 ? (DATEADD("dd",

(DT_I4)AdjustmentDueDayCode,ExpirationDate) : "null"

但仍有同样的错误,有什么建议吗?

1 个答案:

答案 0 :(得分:0)

AdjustmentDueDaycode需要成为BIGINT类型。

IE) DATEADD("dd", CONVERT(BIGINT, (DT_I4)AdjustmentDueDaycode),ExpirationDate)