【发布时间】:2012-08-29 20:17:40
【问题描述】:
我已经在 Sql Server 中使用 IsNull 条件编写了日期和时间列查询.. 我在下面提到了该查询..
我想要的查询是,如何编写 ssis 派生列。我已经在 ssis 中编写了该查询,但出现了一些强制类型错误..
在这里连接日期和时间列。
请帮帮我,
Sql查询---
CAST(ISNULL(CONVERT(Nvarchar(10),InitialDate,101), '01/01/1900') AS Nvarchar(10))+ ' ' + ISNULL(CONVERT(NVarChar(8),InitialTime,108), '00:00:00') as CourtDttm
SSIS 派生列
(DT_DBTIMESTAMP)((DT_STR,255,1252)(ISNULL(InitialDate) ? ((DT_DBTIMESTAMP)"01/01/1900") : (InitialDate)) + " " +
((DT_STR,255,1252)(ISNULL(InitialTime) ? ((DT_DBTIMESTAMP)"00 : 00 : 00") : (InitialTime))))
Errors --[Derived Column [40]] Error: An error occurred while attempting to perform a type cast.
【问题讨论】:
-
我的猜测是一些无效数据。您可以将错误的行重定向到某个文件并检查导致问题的原因。
标签: sql-server-2008 ssis