我有一个SSIS导出包,用于将数据从iSeries系统导出到SQL Server。我正在向包中添加一个新的表导出,该表包括两个日期字段。我的SSIS包通过ODBC连接到iSeries数据库。我可以在MS Access中毫无问题地连接到我想要导出的数据表,并且我可以毫无问题地浏览和查看所有数据。但是,在我的日期字段中,我收到了来自SSIS的可怕的"Invalid character value for cast specification"
错误消息。
如何诊断特定问题?我很确定可能有某种方法可以在SSIS中转换这些数据,我只是不知道如何重新格式化数据,因为我无法从MS Access预览数据的原始状态。我的问题很一般——我能做些什么来解决这个问题或解决这个问题?
感谢开发者!仅供参考,下面的数据是测试任务时Visual Studio中的完整错误详细信息。
Error: 0xC0202009 at [iSeriesTable], [SSIS Task] [113]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Invalid character value for cast specification".
Error: 0xC020901C at [iSeriesTable], [SSIS Task] [113]: There was an error with input column "date_field" (178) on input "OLE DB Destination Input" (126). The column status returned was: "Conversion failed because the data value overflowed the specified type.".
Error: 0xC0209029 at [iSeriesTable], [SSIS Task] [113]: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLE DB Destination Input" (126)" failed because error code 0xC020907A occurred, and the error row disposition on "input "OLE DB Destination Input" (126)" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure.
Error: 0xC0047022 at [iSeriesTable]: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "[SSIS Task]" (113) failed with error code 0xC0209029. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure.
Error: 0xC0047021 at [iSeriesTable]: SSIS Error Code DTS_E_THREADFAILED. Thread "WorkThread0" has exited with error code 0xC0209029. There may be error messages posted before this with more information on why the thread has exited.
尝试将其放入varchar()或其他字符串或文本类型字段,而不是日期字段。有些后端接受SQL Server无法直接处理的日期,因此需要在导入之前对其进行转换。
确保IBM i表中的列定义为DATE,而不是ZONED、PACKED或INTEGER。