使用 SSIS 将日期时间值插入 IBM AS/400 library/system 上的 table 中的日期时间列

Insert a datetime value with SSIS to an datetime column in a table on a IBM AS/400 library/system

我有以下问题。

我想制作一个 SSIS 流,将值从 MS SQL 服务器数据库中的 table 插入到 AS/400 库中的 table。

这适用于除 datetime2 值以外的所有值。我试图以 datetime2 格式插入一个 datetime2 值和一个 varchar 值。两种方法都不起作用。

它给出了以下错误:

[TABLENAME [11566]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21. An OLE DB record is available. Source: "IBMDA400 Command" Hresult: 0x80004005 Description: "CWBZZ5014 Value of parameter COLUMNNAME could not be converted to the host data type.". An OLE DB record is available. Source: "IBMDA400 Command" Hresult: 0x80004005 Description: "CWBZZ5014 Value of parameter COLUMNNAME could not be converted to the host data type.".

[TABLENAME [11566]] Error: There was an error with input column "COLUMNAME" (12245) on input "OLE DB Destination Input" (11579). The column status returned was: "The value could not be converted because of a potential loss of data.".

有人知道怎么做吗?

我认为 sql 脚本中的转换可能是在 IBM 中映射目标列的更好方法,试试这个。

CONVERT(TIMESTAMP, @DateTimeVariable )

使用 derived column 表达式并在那里使用 data conversion

我想试试db_timestamp

数据转换